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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp

Issue 2061113002: Remove ExceptionState::throwIfNeeded Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
index 342dff7dd84a2ae37a3408aa7e3997b9d989dd25..cee5762a08ae26c447cdccd214baf74098b91eeb 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
@@ -193,18 +193,14 @@ HTMLElement* ScriptCustomElementDefinition::createElementSync(
// When invoked from "create an element for a token":
// https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token
+ // 7. If this step throws an exception, then report the exception, ...
+ v8::TryCatch tryCatch(isolate);
+ tryCatch.SetVerbose(true);
ExceptionState exceptionState(ExceptionState::ConstructionContext,
"CustomElement", constructor(), isolate);
HTMLElement* element = createElementSync(document, tagName, exceptionState);
if (exceptionState.hadException() || !element) {
- // 7. If this step throws an exception, then report the exception, ...
- {
- v8::TryCatch tryCatch(isolate);
- tryCatch.SetVerbose(true);
- exceptionState.throwIfNeeded();
- }
-
// ...and let element be instead a new element that implements
// HTMLUnknownElement, with no attributes, namespace set to given
// namespace, namespace prefix set to null, custom element state

Powered by Google App Engine
This is Rietveld 408576698