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

Unified Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.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
« no previous file with comments | « third_party/WebKit/Source/core/dom/CompositorProxy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
index 687ba7ea4e08e5fd507fb48d00b86e54d6c37d5e..981e96d864add31928afffdd3c99c4557a489f4b 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
@@ -238,7 +238,7 @@ void MainThreadDebugger::querySelectorCallback(const v8::FunctionCallbackInfo<v8
return;
ExceptionState exceptionState(ExceptionState::ExecutionContext, "$", "CommandLineAPI", info.Holder(), info.GetIsolate());
Element* element = toContainerNode(node)->querySelector(AtomicString(selector), exceptionState);
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException())
return;
if (element)
info.GetReturnValue().Set(toV8(element, info.Holder(), info.GetIsolate()));
@@ -259,7 +259,7 @@ void MainThreadDebugger::querySelectorAllCallback(const v8::FunctionCallbackInfo
ExceptionState exceptionState(ExceptionState::ExecutionContext, "$$", "CommandLineAPI", info.Holder(), info.GetIsolate());
// toV8(elementList) doesn't work here, since we need a proper Array instance, not NodeList.
StaticElementList* elementList = toContainerNode(node)->querySelectorAll(AtomicString(selector), exceptionState);
- if (exceptionState.throwIfNeeded() || !elementList)
+ if (exceptionState.hadException() || !elementList)
return;
v8::Isolate* isolate = info.GetIsolate();
v8::Local<v8::Context> context = isolate->GetCurrentContext();
@@ -285,7 +285,7 @@ void MainThreadDebugger::xpathSelectorCallback(const v8::FunctionCallbackInfo<v8
ExceptionState exceptionState(ExceptionState::ExecutionContext, "$x", "CommandLineAPI", info.Holder(), info.GetIsolate());
XPathResult* result = XPathEvaluator::create()->evaluate(selector, node, nullptr, XPathResult::ANY_TYPE, ScriptValue(), exceptionState);
- if (exceptionState.throwIfNeeded() || !result)
+ if (exceptionState.hadException() || !result)
return;
if (result->resultType() == XPathResult::NUMBER_TYPE) {
info.GetReturnValue().Set(toV8(result->numberValue(exceptionState), info.Holder(), info.GetIsolate()));
@@ -299,14 +299,13 @@ void MainThreadDebugger::xpathSelectorCallback(const v8::FunctionCallbackInfo<v8
v8::Local<v8::Array> nodes = v8::Array::New(isolate);
size_t index = 0;
while (Node* node = result->iterateNext(exceptionState)) {
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException())
return;
if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.GetIsolate())).FromMaybe(false))
return;
}
info.GetReturnValue().Set(nodes);
}
- exceptionState.throwIfNeeded();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/CompositorProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698