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

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

Issue 1036803002: binidngs: Make callInternalFunction return MaybeLocal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/V8PerIsolateData.cpp
diff --git a/Source/bindings/core/v8/V8PerIsolateData.cpp b/Source/bindings/core/v8/V8PerIsolateData.cpp
index 111292e5fa919c0a8b6a586e249dd3aceb3bcc17..9b6daacf9947b6333bc295e82db50066ae8fe72c 100644
--- a/Source/bindings/core/v8/V8PerIsolateData.cpp
+++ b/Source/bindings/core/v8/V8PerIsolateData.cpp
@@ -242,7 +242,10 @@ static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>& inf
v8SetReturnValue(info, v8::String::Empty(info.GetIsolate()));
return;
}
- v8SetReturnValue(info, V8ScriptRunner::callInternalFunction(v8::Handle<v8::Function>::Cast(value), info.This(), 0, 0, info.GetIsolate()));
+ v8::Local<v8::Value> result;
+ if (!V8ScriptRunner::callInternalFunction(v8::Handle<v8::Function>::Cast(value), info.This(), 0, 0, info.GetIsolate()).ToLocal(&result))
yurys 2015/03/31 07:20:20 If we fail to get a valid result there must be a p
bashi 2015/04/01 01:51:27 Changed not to set return value on failure.
+ result = v8::String::Empty(info.GetIsolate());
+ v8SetReturnValue(info, result);
}
v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate()

Powered by Google App Engine
This is Rietveld 408576698