Skip to content

Commit

Permalink
Remove monkeypatch of globalThis.self in ShadowRealm
Browse files Browse the repository at this point in the history
As per whatwg/html#9893, ShadowRealmGlobalScope
should have a `self` attribute already. There is no need to monkeypatch it
for the test harness.
  • Loading branch information
ptomato committed Nov 18, 2024
1 parent 95af5c9 commit 3098912
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions resources/idlharness-shadowrealm.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ function fetch_text(url) {
function idl_test_shadowrealm(srcs, deps) {
promise_setup(async t => {
const realm = new ShadowRealm();
// https://github.com/web-platform-tests/wpt/issues/31996
realm.evaluate("globalThis.self = globalThis; undefined;");

realm.evaluate(`
globalThis.self.GLOBAL = {
isWindow: function() { return false; },
Expand Down
1 change: 0 additions & 1 deletion tools/serve/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ class ShadowRealmInWindowHandler(HtmlWrapperHandler):
<script>
(async function() {
const r = new ShadowRealm();
r.evaluate("globalThis.self = globalThis; undefined;");
r.evaluate(`func => {
globalThis.fetch_json = (resource) => {
const thenMethod = func(resource);
Expand Down

0 comments on commit 3098912

Please sign in to comment.