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

Issue 2441593002: binding: Returns a reject promise when |this| is not of the type. (Closed)

Created:
4 years, 2 months ago by Yuki
Modified:
4 years, 1 month ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

binding: Returns a reject promise when |this| is not of the type. Returns a reject promise when the receiver object is not of type of the interface, instead of throwing a TypeError. This CL disables the type check on V8 side and does the type check on Blink side, then, if the receiver object is not of the type, converts a TypeError to a reject promise and returns it. BUG=627309 Committed: https://crrev.com/ef6ea8e2cae02459a206885d1eb6ab2f5b62fbfa Cr-Commit-Position: refs/heads/master@{#432798}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Updated the test expectation. #

Total comments: 2

Patch Set 4 : Removed the hack for context->Global()'s internal fields. #

Patch Set 5 : Synced. #

Patch Set 6 : Synced. #

Patch Set 7 : Updated test expectations. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+496 lines, -397 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/credentialmanager/idl-expected.txt View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt View 1 2 3 4 5 6 4 chunks +30 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp View 1 2 3 2 chunks +14 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl View 1 2 3 3 chunks +13 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp View 1 2 3 1 chunk +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 1 2 3 7 chunks +66 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 2 3 1 chunk +14 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 1 2 3 1 chunk +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 8 chunks +274 lines, -241 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 2 3 1 chunk +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 2 3 2 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp View 1 2 3 3 chunks +10 lines, -4 lines 0 comments Download

Messages

Total messages: 51 (33 generated)
Yuki
Could you review this CL?
4 years, 2 months ago (2016-10-21 07:10:18 UTC) #12
haraken
+jochen I'm fine with landing this as a short-term fix, but would it make more ...
4 years, 2 months ago (2016-10-21 08:11:28 UTC) #14
Yuki
https://codereview.chromium.org/2441593002/diff/40001/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl File third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl (right): https://codereview.chromium.org/2441593002/diff/40001/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl#newcode33 third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl:33: info.Holder()->GetPrototype().As<v8::Object>(); On 2016/10/21 08:11:28, haraken wrote: > > Can ...
4 years, 2 months ago (2016-10-21 10:11:19 UTC) #17
haraken
On 2016/10/21 10:11:19, Yuki wrote: > https://codereview.chromium.org/2441593002/diff/40001/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl > File third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl (right): > > https://codereview.chromium.org/2441593002/diff/40001/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl#newcode33 > ...
4 years, 2 months ago (2016-10-21 10:24:49 UTC) #18
Yuki
On 2016/10/21 10:24:49, haraken wrote: > On 2016/10/21 10:11:19, Yuki wrote: > > > https://codereview.chromium.org/2441593002/diff/40001/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl ...
4 years, 2 months ago (2016-10-21 10:28:58 UTC) #19
jochen (gone - plz use gerrit)
can you file a bug for v8 to be able to do this (and put ...
4 years, 2 months ago (2016-10-21 11:07:23 UTC) #20
Yuki
On 2016/10/21 11:07:23, jochen wrote: > can you file a bug for v8 to be ...
4 years, 1 month ago (2016-10-24 12:20:31 UTC) #21
Yuki
Nothing has changed, but could you take another look? Is it okay to go with ...
4 years, 1 month ago (2016-10-25 09:44:22 UTC) #22
haraken
On 2016/10/25 09:44:22, Yuki wrote: > Nothing has changed, but could you take another look? ...
4 years, 1 month ago (2016-10-25 09:52:54 UTC) #23
Yuki
+R=verwaest@
4 years, 1 month ago (2016-10-25 09:59:25 UTC) #25
jochen (gone - plz use gerrit)
(deferring to Kentaro and Toon)
4 years, 1 month ago (2016-10-26 08:29:30 UTC) #26
haraken
On 2016/10/26 08:29:30, jochen wrote: > (deferring to Kentaro and Toon) Per the discussion offline, ...
4 years, 1 month ago (2016-10-26 08:32:40 UTC) #27
Yuki
Could you take another look? I've made necessary changes in V8 and Blink, so we ...
4 years, 1 month ago (2016-11-16 15:17:30 UTC) #42
haraken
LGTM https://codereview.chromium.org/2441593002/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/2441593002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode399 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:399: void installMethodInternal( Not related to this CL, why ...
4 years, 1 month ago (2016-11-16 17:37:31 UTC) #45
Yuki
https://codereview.chromium.org/2441593002/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/2441593002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode399 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:399: void installMethodInternal( On 2016/11/16 17:37:31, haraken wrote: > > ...
4 years, 1 month ago (2016-11-17 07:14:28 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2441593002/120001
4 years, 1 month ago (2016-11-17 07:15:09 UTC) #48
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 1 month ago (2016-11-17 07:21:22 UTC) #49
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 07:23:47 UTC) #51
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/ef6ea8e2cae02459a206885d1eb6ab2f5b62fbfa
Cr-Commit-Position: refs/heads/master@{#432798}

Powered by Google App Engine
This is Rietveld 408576698