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

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed)

Created:
6 years, 6 months ago by Jens Widell
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Use auto-rethrowing v8::TryCatch variant To avoid the need to call ReThrow() on the v8::TryCatch that may or may not be declared, and the risk of forgetting to do so in some case, use an auto-rethrowing v8::TryCatch variant instead. BUG=362388 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175134

Patch Set 1 #

Total comments: 1

Patch Set 2 : rebased #

Patch Set 3 : add/use yhirano's scope classes instead #

Total comments: 2

Patch Set 4 : tweak macro definitions #

Total comments: 7

Patch Set 5 : make constructors explicit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -95 lines) Patch
M Source/bindings/scripts/v8_interface.py View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/v8_methods.py View 5 chunks +5 lines, -6 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 2 chunks +1 line, -10 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 8 chunks +13 lines, -20 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 2 6 chunks +6 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface2.cpp View 1 2 6 chunks +7 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 2 3 chunks +1 line, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 2 4 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.cpp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 112 chunks +112 lines, -18 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperations.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 6 chunks +6 lines, -1 line 0 comments Download
M Source/bindings/v8/V8Binding.h View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8BindingMacros.h View 1 2 3 2 chunks +10 lines, -19 lines 0 comments Download
M Source/bindings/v8/custom/V8DocumentCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Jens Widell
PTAL. This simplifies the TryCatch situation quite a bit, and should be more robust, given ...
6 years, 6 months ago (2014-05-30 07:23:51 UTC) #1
yhirano
https://codereview.chromium.org/304223007/diff/1/Source/bindings/v8/V8Binding.h File Source/bindings/v8/V8Binding.h (right): https://codereview.chromium.org/304223007/diff/1/Source/bindings/v8/V8Binding.h#newcode945 Source/bindings/v8/V8Binding.h:945: class V8TryPropagate : public v8::TryCatch { How about classes ...
6 years, 6 months ago (2014-05-30 08:08:42 UTC) #2
Jens Widell
On 2014/05/30 08:08:42, yhirano wrote: > https://codereview.chromium.org/304223007/diff/1/Source/bindings/v8/V8Binding.h > File Source/bindings/v8/V8Binding.h (right): > > https://codereview.chromium.org/304223007/diff/1/Source/bindings/v8/V8Binding.h#newcode945 > ...
6 years, 6 months ago (2014-05-30 08:46:52 UTC) #3
yhirano
+nbarth lgtm https://codereview.chromium.org/304223007/diff/40001/Source/bindings/v8/V8BindingMacros.h File Source/bindings/v8/V8BindingMacros.h (right): https://codereview.chromium.org/304223007/diff/40001/Source/bindings/v8/V8BindingMacros.h#newcode57 Source/bindings/v8/V8BindingMacros.h:57: v8::TryCatch block; \ You can use V8RethrowTryCatchScope ...
6 years, 6 months ago (2014-05-30 09:33:20 UTC) #4
Jens Widell
https://codereview.chromium.org/304223007/diff/40001/Source/bindings/v8/V8BindingMacros.h File Source/bindings/v8/V8BindingMacros.h (right): https://codereview.chromium.org/304223007/diff/40001/Source/bindings/v8/V8BindingMacros.h#newcode57 Source/bindings/v8/V8BindingMacros.h:57: v8::TryCatch block; \ On 2014/05/30 09:33:21, yhirano wrote: > ...
6 years, 6 months ago (2014-05-30 09:46:39 UTC) #5
haraken
https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8Binding.h File Source/bindings/v8/V8Binding.h (right): https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8Binding.h#newcode945 Source/bindings/v8/V8Binding.h:945: V8RethrowTryCatchScope(v8::TryCatch& block) : m_block(block) { } Add explicit. https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8Binding.h#newcode956 ...
6 years, 6 months ago (2014-05-30 11:58:25 UTC) #6
yhirano
https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8BindingMacros.h File Source/bindings/v8/V8BindingMacros.h (right): https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8BindingMacros.h#newcode58 Source/bindings/v8/V8BindingMacros.h:58: V8RethrowTryCatchScope rethrow(block); \ On 2014/05/30 11:58:25, haraken wrote: > ...
6 years, 6 months ago (2014-05-30 12:06:57 UTC) #7
haraken
On 2014/05/30 12:06:57, yhirano wrote: > https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8BindingMacros.h > File Source/bindings/v8/V8BindingMacros.h (right): > > https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8BindingMacros.h#newcode58 > ...
6 years, 6 months ago (2014-05-30 12:12:52 UTC) #8
Jens Widell
Thank you for reviewing, yhirano and haraken! https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8Binding.h File Source/bindings/v8/V8Binding.h (right): https://codereview.chromium.org/304223007/diff/60001/Source/bindings/v8/V8Binding.h#newcode945 Source/bindings/v8/V8Binding.h:945: V8RethrowTryCatchScope(v8::TryCatch& block) ...
6 years, 6 months ago (2014-05-30 12:20:15 UTC) #9
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 6 months ago (2014-05-30 12:20:23 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/304223007/80001
6 years, 6 months ago (2014-05-30 12:21:03 UTC) #11
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 14:32:39 UTC) #12
Message was sent while issue was closed.
Change committed as 175134

Powered by Google App Engine
This is Rietveld 408576698