Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Issue 1685543002: Supports "class string" based on @@toStringTag. (Closed)

Created:
4 years, 10 months ago by Yuki
Modified:
4 years, 9 months ago
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Supports "class string" based on @@toStringTag. Fixes the regression caused by a V8 change at http://crrev.com/1435273002 . http://crrev.com/1435273002 changed a way to show the name of objects, and Blink is now showing the wrong name for the interface prototype objects. Before http://crrev.com/1435273002 : console> HTMLBodyElement.prototype => HTMLBodyElement {} Now: console> HTMLBodyElement.prototype => HTMLElement {} With this CL: console> HTMLBodyElement.prototype => HTMLBodyElement {} This CL mainly focuses to fix the regression. Since the regression happened back in M49 and the wrong name is very confusing for JS developers, we might want to merge this fix into M49 branch. However, this fix has the following side effect, so we might not want to merge this fix into M49. [Side effect] Before: console> Object.prototype.toString.call(HTMLBodyElement.prototype) => [object Object] After: console> Object.prototype.toString.call(HTMLBodyElement.prototype) => [object HTMLBodyElement] (This side effect is correct in terms of the spec, but it breaks the backward compatibility with the older versions of Chrome.) Note that interface prototype objects, platform objects, etc. are expected to have a class string, which should be implemented with @@toStringTag in ES2015. This is what V8 now expects Blink to use. cf. http://heycam.github.io/webidl/#dfn-class-string This CL adds @@toStringTag only to interface prototype objects, not to other objects such as platform objects. The reason is because we might or might not want to merge this fix into M49, so we'd like to minimize the change for now. BUG=585028 TBR=haraken@chromium.org Committed: https://crrev.com/909c0d7d5a53c8526ded351683c65ea7d17531d4 Cr-Commit-Position: refs/heads/master@{#377890}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : Synced. #

Total comments: 2

Patch Set 8 : Synced. #

Patch Set 9 : Synced. #

Patch Set 10 : #

Patch Set 11 : Synced. #

Patch Set 12 : Test with window.toString removed #

Patch Set 13 : Synced. #

Patch Set 14 : Updated test expectations. #

Patch Set 15 : Excludes Window's prototype object. #

Patch Set 16 : Synced. #

Patch Set 17 : Fixed: Excludes Window's prototype object. #

Patch Set 18 : Synced. #

Patch Set 19 : Fixed to register @@toStringTag only once. #

Patch Set 20 : Synced. #

Patch Set 21 : Updated test expectations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -323 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/dom/Window/lookup-behavior-expected.txt View 1 2 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/window-lookup-precedence-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/htmlallcollection-enumerated-properties-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/prototype-chain.html View 1 2 2 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/prototype-chain-expected.txt View 1 2 1 chunk +22 lines, -22 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/wrapper-classes-expected.txt View 1 2 1 chunk +149 lines, -149 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/event-view-toString.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/event-view-toString-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/js/toString-and-valueOf-override-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/serviceworker/serviceworker-interface-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/workers/shared-worker-replace-self-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/workers/worker-replace-self-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-custom.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-custom-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/w3c/webperf/approved/navigation-timing/html/idlharness-expected.txt View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-inheritance-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/idlharness-expected.txt View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/interfaces-expected.txt View 1 2 9 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/interfaces-expected.txt View 1 2 3 4 5 6 7 8 24 chunks +24 lines, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/encoding/idlharness-expected.txt View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-prototype-chain-expected.txt View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/web-platform-tests/html/webappapis/animation-frames/idlharness-expected.txt View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/user-timing/idlharness-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/webstorage/idlharness-expected.txt View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-log-document-proto-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/custom/SVGException-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 15 16 17 18 1 chunk +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface_base.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/Window.idl View 1 2 3 4 5 6 7 8 9 10 11 15 16 17 18 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 40 (17 generated)
Yuki
haraken and Toon, could you guys review this CL?
4 years, 10 months ago (2016-02-12 12:46:29 UTC) #3
haraken
+adamk
4 years, 10 months ago (2016-02-12 12:49:42 UTC) #5
Toon Verwaest
lgtm
4 years, 10 months ago (2016-02-12 13:43:28 UTC) #6
caitp (gmail)
https://codereview.chromium.org/1685543002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/1685543002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode320 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:320: // See also http://heycam.github.io/webidl/#es-platform-objects Has there been more discussion ...
4 years, 10 months ago (2016-02-12 14:44:46 UTC) #7
adamk
https://codereview.chromium.org/1685543002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/1685543002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode317 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:317: // (|instanceTemplate|), too. The reason that we don't set ...
4 years, 10 months ago (2016-02-12 18:31:33 UTC) #8
Yuki
I updated the CL description. Sorry for confusing you guys. The main purpose of this ...
4 years, 10 months ago (2016-02-15 06:54:53 UTC) #10
Yuki
On 2016/02/15 06:54:53, Yuki wrote: > I updated the CL description. Sorry for confusing you ...
4 years, 10 months ago (2016-02-16 13:24:57 UTC) #11
adamk
My worry is that this changes web-exposed behavior, not just what the console shows. In ...
4 years, 10 months ago (2016-02-16 18:30:50 UTC) #12
Yuki
On 2016/02/16 18:30:50, adamk wrote: > My worry is that this changes web-exposed behavior, not ...
4 years, 10 months ago (2016-02-17 09:31:44 UTC) #14
adamk
On 2016/02/17 09:31:44, Yuki wrote: > On 2016/02/16 18:30:50, adamk wrote: > > My worry ...
4 years, 10 months ago (2016-02-17 18:53:26 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685543002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685543002/180001
4 years, 10 months ago (2016-02-18 07:57:32 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/181812)
4 years, 10 months ago (2016-02-18 09:12:19 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685543002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685543002/180001
4 years, 10 months ago (2016-02-18 11:10:25 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/168374) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 10 months ago (2016-02-18 11:44:57 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685543002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685543002/280001
4 years, 10 months ago (2016-02-24 14:36:10 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/184987)
4 years, 10 months ago (2016-02-24 15:56:08 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685543002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685543002/400001
4 years, 9 months ago (2016-02-26 14:47:36 UTC) #32
commit-bot: I haz the power
Committed patchset #21 (id:400001)
4 years, 9 months ago (2016-02-26 15:13:52 UTC) #34
commit-bot: I haz the power
Patchset 21 (id:??) landed as https://crrev.com/909c0d7d5a53c8526ded351683c65ea7d17531d4 Cr-Commit-Position: refs/heads/master@{#377890}
4 years, 9 months ago (2016-02-26 15:15:23 UTC) #36
Yuki
haraken@, allow me TBR because I'd really like to fix this issue at least in ...
4 years, 9 months ago (2016-02-26 15:17:55 UTC) #37
haraken
On 2016/02/26 15:17:55, Yuki wrote: > haraken@, allow me TBR because I'd really like to ...
4 years, 9 months ago (2016-02-26 17:09:02 UTC) #38
jsbell
On 2016/02/12 14:44:46, caitp (OOO til 1-3-2016) wrote: > Has there been more discussion about ...
4 years, 9 months ago (2016-02-26 17:40:32 UTC) #39
Yuki
4 years, 9 months ago (2016-03-01 05:39:49 UTC) #40
Message was sent while issue was closed.
On 2016/02/26 17:40:32, jsbell wrote:
> On 2016/02/12 14:44:46, caitp (OOO til 1-3-2016) wrote:
> > Has there been more discussion about this since
> > https://www.w3.org/Bugs/Public/show_bug.cgi?id=28244 ?
> 
> I dropped a note on that thread. We should report on the success of this
> (sticks/reverted) back to that bug, to inform WebIDL spec changes.

Thanks for the note.  I'll report our progress there.

Powered by Google App Engine
This is Rietveld 408576698