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

Unified Diff: Source/web/WebLocalFrameImpl.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
« no previous file with comments | « Source/bindings/modules/v8/custom/V8CustomSQLStatementErrorCallback.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 296e6ca3ac7ea8d1dab406172551d81a04c1f158..af4e42e4e94dab86004b193e4880ef4584b5d370 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -896,12 +896,14 @@ void WebLocalFrameImpl::requestExecuteScriptInIsolatedWorld(int worldID, const W
SuspendableScriptExecutor::createAndRun(frame(), worldID, createSourcesVector(sourcesIn, numSources), extensionGroup, userGesture, callback);
}
+// TODO(bashi): Consider returning MaybeLocal.
v8::Local<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> argv[])
{
ASSERT(frame());
- // TODO(bashi): Change the signature of callFunctionEvenIfScriptDisabled()
- // so that it takes v8::Local instead of v8::Handle.
- return frame()->script().callFunction(function, receiver, argc, argv);
+ v8::Local<v8::Value> result;
+ if (!frame()->script().callFunction(function, receiver, argc, static_cast<v8::Local<v8::Value>*>(argv)).ToLocal(&result))
+ return v8::Local<v8::Value>();
+ return result;
}
v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const
« no previous file with comments | « Source/bindings/modules/v8/custom/V8CustomSQLStatementErrorCallback.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698