fune/dom/workers/test/sharedWorker_console.js
Alexandre Poirot b093bf6667 Bug 1860888 - [devtools] Fix logging SharedArrayBuffer from Worklet/Workers. r=devtools-reviewers,smaug
This custom CloneDataPolicy was already using while writing the structured clone,
but not when reading it.

Differential Revision: https://phabricator.services.mozilla.com/D191783
2023-11-06 14:42:52 +00:00

12 lines
366 B
JavaScript

/**
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
"use strict";
onconnect = function (evt) {
console.profile("Hello profiling from a SharedWorker!");
console.log("Hello world from a SharedWorker!");
console.log("Here is a SAB", new SharedArrayBuffer(1024));
evt.ports[0].postMessage("ok!");
};