WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
215750
Console object's @@toStringTag should be "console" instead of "Console"
https://bugs.webkit.org/show_bug.cgi?id=215750
Summary
Console object's @@toStringTag should be "console" instead of "Console"
Yusuke Suzuki
Reported
2020-08-21 22:37:20 PDT
Console object's @@toStringTag should be "console" instead of "Console"
Attachments
Patch
(29.34 KB, patch)
2020-08-21 22:38 PDT
,
Yusuke Suzuki
ross.kirsling
: review+
Details
Formatted Diff
Diff
Patch
(37.75 KB, patch)
2020-08-21 23:33 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(37.75 KB, patch)
2020-08-21 23:33 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2020-08-21 22:38:01 PDT
Created
attachment 407042
[details]
Patch
Ross Kirsling
Comment 2
2020-08-21 22:57:27 PDT
Comment on
attachment 407042
[details]
Patch r=me, given that CSS[@@toStringTag] will be addressed in a later patch. We should probably link
https://github.com/web-platform-tests/wpt/pull/24717
in the ChangeLog though.
Yusuke Suzuki
Comment 3
2020-08-21 23:27:29 PDT
(In reply to Ross Kirsling from
comment #2
)
> Comment on
attachment 407042
[details]
> Patch > > r=me, given that CSS[@@toStringTag] will be addressed in a later patch. > > We should probably link
https://github.com/web-platform-tests/wpt/pull/24717
> in the ChangeLog though.
Sounds good!
Yusuke Suzuki
Comment 4
2020-08-21 23:33:01 PDT
Created
attachment 407044
[details]
Patch Patch for landing
Yusuke Suzuki
Comment 5
2020-08-21 23:33:34 PDT
Created
attachment 407045
[details]
Patch Patch for landing
Alexey Shvayka
Comment 6
2020-08-22 07:37:01 PDT
(In reply to Ross Kirsling from
comment #2
)
> Comment on
attachment 407042
[details]
> Patch > > r=me, given that CSS[@@toStringTag] will be addressed in a later patch.
For `CSS`, it might get tricky since `CodeGeneratorJS.pm` has no notion of namespace objects. Currently, `CSS.prototype[Symbol.toStringTag] === "CSS"`, but it's wrong since `CSS` shouldn't be a function. Making `CSS` an ordinary object will take some tweaking to code generator (an extra attribute) + might break some sites depending on `typeof CSS === "function"` check. So instead, we may consider adding Symbol.toStringTag in [CustomToJSObject] or something, until Chromium will ship `CSS` as ordinary object change. Tests for namespace objects:
https://github.com/web-platform-tests/wpt/pull/24724
.
Alexey Shvayka
Comment 7
2020-08-22 07:45:26 PDT
(In reply to Alexey Shvayka from
comment #6
)
> So instead, we may consider adding Symbol.toStringTag in [CustomToJSObject] > or something, until Chromium will ship `CSS` as ordinary object change.
Or we can just hardcode `$interfaceName eq "CSS"` at CodeGeneratorJS.pm:4445 and add it there, but it won't look nice.
Yusuke Suzuki
Comment 8
2020-08-22 10:51:28 PDT
I'll land it with testapi rebaseline.
Yusuke Suzuki
Comment 9
2020-08-22 11:02:19 PDT
(In reply to Alexey Shvayka from
comment #7
)
> (In reply to Alexey Shvayka from
comment #6
) > > So instead, we may consider adding Symbol.toStringTag in [CustomToJSObject] > > or something, until Chromium will ship `CSS` as ordinary object change. > > Or we can just hardcode `$interfaceName eq "CSS"` at CodeGeneratorJS.pm:4445 > and add it there, but it won't look nice.
Yeah, I think, supporting `namespace` in IDL would be the best way :)
Yusuke Suzuki
Comment 10
2020-08-22 11:08:57 PDT
Committed
r266030
: <
https://trac.webkit.org/changeset/266030
>
Radar WebKit Bug Importer
Comment 11
2020-08-22 11:09:15 PDT
<
rdar://problem/67620195
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug