Chromium Code Reviews| 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) |