diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-06-17 11:05:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-17 11:05:02 -0400 |
commit | 367e006e06b0275ac1ac06669ce19f6192735c34 (patch) | |
tree | 4edd702b991d654d4ecf6c1d639b4086f47aafb3 /tools/wpt/testharnessreport.js | |
parent | 870d2007163f687b1014db4e5cb43f95aff6d77f (diff) |
fix(ext/web): add EventTarget brand checking (#14637)
This commit adds brand checking to EventTarget. It also fixes a
bug where deno would crash if an abort signal was aborted on the
global addEventListener().
Diffstat (limited to 'tools/wpt/testharnessreport.js')
-rw-r--r-- | tools/wpt/testharnessreport.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/wpt/testharnessreport.js b/tools/wpt/testharnessreport.js index 3368faa4e..a07c916c7 100644 --- a/tools/wpt/testharnessreport.js +++ b/tools/wpt/testharnessreport.js @@ -18,5 +18,12 @@ window.add_completion_callback((_tests, harnessStatus) => { while (bytesWritten < data.byteLength) { bytesWritten += Deno.stderr.writeSync(data.subarray(bytesWritten)); } + + // TODO(cjihrig): Restore the prototype of globalThis to be an EventTarget + // again. There are WPTs that change the prototype, which causes brand + // checking to fail. Once the globalThis prototype is frozen properly, this + // line can be removed. + Object.setPrototypeOf(globalThis, EventTarget.prototype); + Deno.exit(harnessStatus.status === 0 ? 0 : 1); }); |