embedder-context-module.js (451B)
1 // Copyright 2023 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 class ReportContext { 6 async run(data) { 7 if (!data || !data.hasOwnProperty('ancestorKey')) { 8 return; 9 } 10 const ancestorKey = data['ancestorKey']; 11 const context = sharedStorage.context; 12 await sharedStorage.set(ancestorKey, context); 13 } 14 } 15 16 register('report-context', ReportContext);