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

Issue 2061113002: Remove ExceptionState::throwIfNeeded

Created:
4 years, 6 months ago by haraken
Modified:
4 years, 5 months ago
Reviewers:
Yuki
CC:
chromium-reviews, caseq+blink_chromium.org, blink-reviews-style_chromium.org, blink-reviews-dom_chromium.org, sof, eae+blinkwatch, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, blink-reviews-bindings_chromium.org, sergeyv+blink_chromium.org, rwlbuis, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove ExceptionState::throwIfNeeded ExceptionState should throw its pending exception when the ExceptionState gets destructed. That way, caller sites don't need to call ExceptionState::throwIfNeeded every time. BUG=

Patch Set 1 #

Patch Set 2 : temp #

Patch Set 3 : temp #

Total comments: 1

Patch Set 4 : temp #

Patch Set 5 : temp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1000 lines, -871 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ExceptionState.h View 2 chunks +2 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp View 1 2 3 4 4 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp View 2 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8DocumentCustom.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8MutationObserverCustom.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp View 1 2 3 7 chunks +1 line, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8XMLHttpRequestCustom.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h View 2 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_methods.py View 1 2 3 2 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_types.py View 1 chunk +1 line, -5 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/attributes.cpp View 6 chunks +1 line, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.cpp View 1 2 3 12 chunks +8 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp View 1 2 3 5 chunks +10 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/utilities.cpp View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/ArrayBufferOrArrayBufferViewOrDictionary.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/BooleanOrStringOrUnrestrictedDouble.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/DoubleOrString.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/LongOrTestDictionary.cpp View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/StringOrArrayBufferOrArrayBufferView.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/StringOrStringSequence.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestEnumOrDouble.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceGarbageCollectedOrString.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp View 1 2 22 chunks +44 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp View 1 2 4 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 1 2 3 51 chunks +80 lines, -59 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 2 3 25 chunks +20 lines, -40 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 2 3 7 chunks +0 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 1 2 3 7 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 1 2 3 10 chunks +28 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp View 1 2 3 6 chunks +16 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 1 2 3 13 chunks +8 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 1 2 3 4 chunks +12 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 1 2 3 6 chunks +12 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp View 1 2 3 7 chunks +12 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp View 1 2 3 4 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 336 chunks +541 lines, -436 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 2 3 9 chunks +18 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 2 3 26 chunks +34 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp View 1 2 3 13 chunks +16 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/dom/CompositorProxy.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp View 1 2 3 4 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (2 generated)
haraken
This is not yet for review, but # of failing tests are getting under control ...
4 years, 6 months ago (2016-06-14 11:43:58 UTC) #3
Yuki
4 years, 6 months ago (2016-06-15 07:23:25 UTC) #4
https://codereview.chromium.org/2061113002/diff/40001/third_party/WebKit/Sour...
File third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp (right):

https://codereview.chromium.org/2061113002/diff/40001/third_party/WebKit/Sour...
third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp:107:
clearException();
Why do you need this line?

throwException() is a private member function, and only the call site is the
destructor.  It seems more efficient to let the destructor of ScopedPersistent
clears things.

If it makes something clearer, I'd migrate the implementation of
throwException() into the destructor so that it's clear that no one else throws.
 Then, it's obvious that there is no need to do clearException().

Powered by Google App Engine
This is Rietveld 408576698