From 1c6fb1a7ba12f2af635ca7bdf7982b9b3757ef87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20W=C3=BClker?= Date: Sun, 8 Sep 2024 01:10:47 +0200 Subject: [PATCH] Set empty object as `console` prototype (#33358) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove console prototype hack The console object has an empty object as its prototype, not the realm object prototype. Signed-off-by: Simon Wülker * Update WPT expectations Signed-off-by: Simon Wülker --------- Signed-off-by: Simon Wülker --- components/script/dom/webidls/Console.webidl | 3 +-- .../wpt/meta/console/console-is-a-namespace.any.js.ini | 10 ---------- tests/wpt/meta/console/idlharness.any.js.ini | 6 ------ 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/components/script/dom/webidls/Console.webidl b/components/script/dom/webidls/Console.webidl index 4cc02d80436..fe0435476cb 100644 --- a/components/script/dom/webidls/Console.webidl +++ b/components/script/dom/webidls/Console.webidl @@ -5,8 +5,7 @@ // https://console.spec.whatwg.org/ [ClassString="Console", - Exposed=(Window,Worker,Worklet), - ProtoObjectHack] + Exposed=(Window,Worker,Worklet)] namespace console { // Logging undefined log(any... messages); diff --git a/tests/wpt/meta/console/console-is-a-namespace.any.js.ini b/tests/wpt/meta/console/console-is-a-namespace.any.js.ini index 2d4bda8d093..00a9fa74cec 100644 --- a/tests/wpt/meta/console/console-is-a-namespace.any.js.ini +++ b/tests/wpt/meta/console/console-is-a-namespace.any.js.ini @@ -1,12 +1,2 @@ -[console-is-a-namespace.any.worker.html] - [The prototype chain must be correct] - expected: FAIL - - -[console-is-a-namespace.any.html] - [The prototype chain must be correct] - expected: FAIL - - [console-is-a-namespace.any.shadowrealm.html] expected: ERROR diff --git a/tests/wpt/meta/console/idlharness.any.js.ini b/tests/wpt/meta/console/idlharness.any.js.ini index a1cbfd2aab1..2d14758cca3 100644 --- a/tests/wpt/meta/console/idlharness.any.js.ini +++ b/tests/wpt/meta/console/idlharness.any.js.ini @@ -1,7 +1,4 @@ [idlharness.any.html] - [console namespace: [[Prototype\]\] is Object.prototype] - expected: FAIL - [console namespace: operation assert(optional boolean, any...)] expected: FAIL @@ -28,9 +25,6 @@ [idlharness.any.worker.html] - [console namespace: [[Prototype\]\] is Object.prototype] - expected: FAIL - [console namespace: operation assert(optional boolean, any...)] expected: FAIL