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

Unified Diff: Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp

Issue 1061503005: bindings: Use Maybe version of Call() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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: Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp
diff --git a/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp b/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp
index 274c2a1855952f253586574af6fb26e9f6a5509d..0f04f01571af48b5423cf16d3af9889330278199 100644
--- a/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp
+++ b/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp
@@ -79,11 +79,14 @@ v8::Local<v8::Value> V8WorkerGlobalScopeEventListener::callListenerFunction(Scri
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFunction(scriptState->executionContext(), DevToolsFunctionInfo(handlerFunction));
v8::Local<v8::Value> parameters[1] = { jsEvent };
- v8::Local<v8::Value> result = V8ScriptRunner::callFunction(handlerFunction, scriptState->executionContext(), receiver, WTF_ARRAY_LENGTH(parameters), parameters, isolate());
+ v8::MaybeLocal<v8::Value> maybeResult = V8ScriptRunner::callFunction(handlerFunction, scriptState->executionContext(), receiver, WTF_ARRAY_LENGTH(parameters), parameters, isolate());
InspectorInstrumentation::didCallFunction(cookie);
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data());
+ v8::Local<v8::Value> result;
+ if (!maybeResult.ToLocal(&result))
+ return v8::Local<v8::Value>();
return result;
}
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | Source/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698