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

Issue 171533006: V8 Binding: Introduce toNativeWithTypeCheck (Closed)

Created:
6 years, 10 months ago by haraken
Modified:
6 years, 10 months ago
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, sof, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, watchdog-blink-watchlist_google.com, Inactive
Visibility:
Public.

Description

V8 Binding: Introduce toNativeWithTypeCheck Currently V8 binding has a lot of code that has the following pattern: XXX* imp = 0; if (V8XXX::hasInstance(wrapper)) imp = V8XXX::toNative(wrapper); This CL implements V8XXX::toNativeWithTypeCheck() and enables developers write the above code like this: XXX* imp = toNativeWithTypeCheck(wrapper); (The real intention of this CL is a preparation for removing worldType() from the code base, but it's hard to explain the relationship at this point.) BUG=341032 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167512

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+329 lines, -154 lines) Patch
M Source/bindings/scripts/code_generator_v8.pm View 1 2 3 4 3 chunks +7 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestEventTarget.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestEventTarget.cpp View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestException.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestException.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 2 8 chunks +12 lines, -7 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 2 3 4 3 chunks +7 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDoNotCheckConstants.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDoNotCheckConstants.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEmpty.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEmpty.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython.cpp View 1 2 7 chunks +11 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython2.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython2.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython3.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython3.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp View 1 2 3 chunks +7 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestNode.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestNode.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 4 19 chunks +23 lines, -18 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 1 2 3 4 36 chunks +40 lines, -35 lines 0 comments Download
M Source/bindings/tests/results/V8TestSVG.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSVG.cpp View 1 2 6 chunks +10 lines, -5 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsAnonymous.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsAnonymous.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsCustom.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsCustom.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsInt.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsInt.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsOverrideBuiltins.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsOverrideBuiltins.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/v8/Dictionary.cpp View 1 2 9 chunks +9 lines, -27 lines 0 comments Download
M Source/bindings/v8/IDBBindingUtilities.cpp View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M Source/bindings/v8/V8NPObject.cpp View 1 2 3 5 chunks +13 lines, -15 lines 0 comments Download
M Source/bindings/v8/custom/V8ArrayBufferCustom.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/custom/V8ArrayBufferCustom.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/v8/custom/V8ArrayBufferViewCustom.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/custom/V8ArrayBufferViewCustom.cpp View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp View 1 2 1 chunk +4 lines, -7 lines 0 comments Download
M Source/bindings/v8/custom/V8DocumentCustom.cpp View 1 2 3 2 chunks +2 lines, -7 lines 0 comments Download
M Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp View 1 2 1 chunk +2 lines, -4 lines 0 comments Download
M Source/bindings/v8/custom/V8NodeCustom.cpp View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
M Source/bindings/v8/custom/V8TypedArrayCustom.h View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp View 1 2 5 chunks +5 lines, -7 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
haraken
PTAL
6 years, 10 months ago (2014-02-19 02:47:22 UTC) #1
dcarney
lgtm
6 years, 10 months ago (2014-02-19 08:00:38 UTC) #2
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 10 months ago (2014-02-19 08:46:09 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/171533006/130001
6 years, 10 months ago (2014-02-19 08:46:16 UTC) #4
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-19 10:32:32 UTC) #5
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=22279
6 years, 10 months ago (2014-02-19 10:32:32 UTC) #6
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 10 months ago (2014-02-19 11:34:54 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/171533006/310001
6 years, 10 months ago (2014-02-19 11:35:00 UTC) #8
Paweł Hajdan Jr.
The CQ bit was unchecked by phajdan.jr@chromium.org
6 years, 10 months ago (2014-02-19 19:31:00 UTC) #9
Paweł Hajdan Jr.
The CQ bit was checked by phajdan.jr@chromium.org
6 years, 10 months ago (2014-02-19 19:32:31 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/171533006/310001
6 years, 10 months ago (2014-02-19 21:54:25 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/171533006/310001
6 years, 10 months ago (2014-02-19 23:00:37 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-20 03:03:10 UTC) #13
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=28019
6 years, 10 months ago (2014-02-20 03:03:10 UTC) #14
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 10 months ago (2014-02-20 09:26:54 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/171533006/310001
6 years, 10 months ago (2014-02-20 09:27:00 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-20 09:27:28 UTC) #17
commit-bot: I haz the power
Failed to apply patch for Source/bindings/tests/results/V8TestObject.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 10 months ago (2014-02-20 09:27:29 UTC) #18
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 10 months ago (2014-02-20 09:35:01 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/171533006/550001
6 years, 10 months ago (2014-02-20 09:35:11 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-20 09:35:28 UTC) #21
commit-bot: I haz the power
Failed to apply patch for Source/bindings/tests/results/V8TestObject.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 10 months ago (2014-02-20 09:35:29 UTC) #22
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 10 months ago (2014-02-20 10:42:50 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/171533006/3
6 years, 10 months ago (2014-02-20 10:43:01 UTC) #24
commit-bot: I haz the power
Change committed as 167512
6 years, 10 months ago (2014-02-20 14:09:21 UTC) #25
haraken
LGTM I'm a bit concerned that this CL might cause memory leaks since it is ...
6 years, 10 months ago (2014-02-21 00:47:44 UTC) #26
haraken
6 years, 10 months ago (2014-02-21 00:48:30 UTC) #27
Message was sent while issue was closed.
^^^ Sorry, ignore this comment. I posted the comment to a wrong issue.

Powered by Google App Engine
This is Rietveld 408576698