1
0
Fork 0
firefox/js/xpconnect/tests/mochitest/private_field_worker.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

21 lines
No EOL
293 B
JavaScript

class A {
#x;
g(o) {
return #x in o;
}
}
let objects = [];
self.onmessage = function (e) {
if (e.data === 'allocate') {
objects.push(new A);
return;
}
if (e.data == 'count') {
postMessage(objects.length);
return;
}
postMessage('Unknown message type.');
}