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

Unified Diff: Source/bindings/core/v8/ScriptDebugServer.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/ScriptDebugServer.cpp
diff --git a/Source/bindings/core/v8/ScriptDebugServer.cpp b/Source/bindings/core/v8/ScriptDebugServer.cpp
index fed9b5f00e3db1a6e62a14a6d52f1c06a15a2295..230773853618282d4ff7113616f57be4e24e319d 100644
--- a/Source/bindings/core/v8/ScriptDebugServer.cpp
+++ b/Source/bindings/core/v8/ScriptDebugServer.cpp
@@ -68,7 +68,7 @@ v8::Local<v8::Value> ScriptDebugServer::callDebuggerMethod(const char* functionN
v8::Local<v8::Object> debuggerScript = debuggerScriptLocal();
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(debuggerScript->Get(v8InternalizedString(functionName)));
ASSERT(m_isolate->InContext());
- return V8ScriptRunner::callInternalFunction(function, debuggerScript, argc, argv, m_isolate);
+ return V8ScriptRunner::callInternalFunction(function, debuggerScript, argc, argv, m_isolate).ToLocalChecked();
haraken 2015/03/25 12:05:22 How is it guaranteed that this callInternalFunctio
yurys 2015/03/25 12:25:06 In fact it is expected to throw in some cases. See
bashi 2015/03/27 00:39:50 In other places, I changed the return value to May
}
ScriptDebugServer::ScriptDebugServer(v8::Isolate* isolate)
@@ -118,8 +118,8 @@ void ScriptDebugServer::reportCompiledScripts(const String& contextDebugDataSubs
ASSERT(!debuggerScript->IsUndefined());
v8::Local<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(debuggerScript->Get(v8AtomicString(m_isolate, "getScripts")));
v8::Local<v8::Value> argv[] = { v8String(m_isolate, contextDebugDataSubstring) };
- v8::Local<v8::Value> value = V8ScriptRunner::callInternalFunction(getScriptsFunction, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate);
- if (value.IsEmpty())
+ v8::Local<v8::Value> value;
+ if (!V8ScriptRunner::callInternalFunction(getScriptsFunction, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate).ToLocal(&value))
return;
ASSERT(value->IsArray());
v8::Local<v8::Array> scriptsArray = v8::Local<v8::Array>::Cast(value);
@@ -545,7 +545,7 @@ static v8::Local<v8::Value> callInternalGetterFunction(v8::Local<v8::Object> obj
{
v8::Local<v8::Value> getterValue = object->Get(v8AtomicString(isolate, functionName));
ASSERT(!getterValue.IsEmpty() && getterValue->IsFunction());
- return V8ScriptRunner::callInternalFunction(v8::Local<v8::Function>::Cast(getterValue), object, 0, 0, isolate);
+ return V8ScriptRunner::callInternalFunction(v8::Local<v8::Function>::Cast(getterValue), object, 0, 0, isolate).ToLocalChecked();
}
void ScriptDebugServer::handleV8DebugEvent(const v8::Debug::EventDetails& eventDetails)

Powered by Google App Engine
This is Rietveld 408576698