Chromium Code Reviews| Index: Source/web/WebLocalFrameImpl.cpp |
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp |
| index d1a9f84032dcb01c931f0bbfd8c4dfa6450f0d42..5e62eec72b5ac3782152d8af7950430728190a8f 100644 |
| --- a/Source/web/WebLocalFrameImpl.cpp |
| +++ b/Source/web/WebLocalFrameImpl.cpp |
| @@ -896,6 +896,7 @@ void WebLocalFrameImpl::requestExecuteScriptInIsolatedWorld(int worldID, const W |
| SuspendableScriptExecutor::createAndRun(frame(), worldID, createSourcesVector(sourcesIn, numSources), extensionGroup, userGesture, callback); |
| } |
| +// TODO(bashi): Consider returning MaybeLocal. |
| #ifndef WEB_FRAME_USES_V8_LOCAL |
| v8::Local<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Handle<v8::Value> argv[]) |
| #else |
| @@ -903,9 +904,10 @@ v8::Local<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(v8::Loc |
| #endif |
| { |
| 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, static_cast<v8::Local<v8::Value>*>(argv)); |
| + v8::Local<v8::Value> result; |
| + if (frame()->script().callFunction(function, receiver, argc, static_cast<v8::Local<v8::Value>*>(argv)).ToLocal(&result)) |
|
haraken
2015/04/18 23:10:47
Ditto.
haraken
2015/04/18 23:10:47
Nit: I'd prefer using the following programming pa
bashi
2015/04/21 00:15:40
Done.
bashi
2015/04/21 00:15:40
Sorry, I couldn't find what you want to say here.
haraken
2015/04/21 04:38:54
Ignore the comment :)
|
| + return result; |
| + return v8::Local<v8::Value>(); |
| } |
| v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const |