| Summary: | Console object's @@toStringTag should be "console" instead of "Console" | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | ashvayka, clopez, ews-watchlist, hi, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer, youennf | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Yusuke Suzuki
2020-08-21 22:37:20 PDT
Created attachment 407042 [details]
Patch
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. (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! Created attachment 407044 [details]
Patch
Patch for landing
Created attachment 407045 [details]
Patch
Patch for landing
(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. (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. I'll land it with testapi rebaseline. (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 :) Committed r266030: <https://trac.webkit.org/changeset/266030> |