mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
fix: overriding self.postMessage should not impact worker_threads.parentPort (#10496)
* fix a bug in worker * remove old
This commit is contained in:
@@ -124,9 +124,10 @@ function fakeParentPort() {
|
||||
},
|
||||
});
|
||||
|
||||
const postMessage = $newCppFunction("ZigGlobalObject.cpp", "jsFunctionPostMessage", 1);
|
||||
Object.defineProperty(fake, "postMessage", {
|
||||
value(...args: [any, any]) {
|
||||
return self.postMessage(...args);
|
||||
return postMessage(...args);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user