Index: third_party/WebKit/Source/core/inspector/v8/JavaScriptCallFrame.cpp |
diff --git a/third_party/WebKit/Source/core/inspector/v8/JavaScriptCallFrame.cpp b/third_party/WebKit/Source/core/inspector/v8/JavaScriptCallFrame.cpp |
index ca069d58a18e9a5b8430836a3872cbd4f60a5eb6..8aa0b19482747f8f436d88bbd7a7c8959b6f2701 100644 |
--- a/third_party/WebKit/Source/core/inspector/v8/JavaScriptCallFrame.cpp |
+++ b/third_party/WebKit/Source/core/inspector/v8/JavaScriptCallFrame.cpp |
@@ -51,9 +51,9 @@ JavaScriptCallFrame* JavaScriptCallFrame::caller() |
{ |
if (!m_caller) { |
v8::HandleScope handleScope(m_isolate); |
- v8::Local<v8::Context> debuggerContext = m_debuggerContext.newLocal(m_isolate); |
+ v8::Local<v8::Context> debuggerContext = v8::Local<v8::Context>::New(m_isolate, m_debuggerContext); |
v8::Context::Scope contextScope(debuggerContext); |
- v8::Local<v8::Value> callerFrame = m_callFrame.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "caller")); |
+ v8::Local<v8::Value> callerFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame)->Get(v8AtomicString(m_isolate, "caller")); |
if (callerFrame.IsEmpty() || !callerFrame->IsObject()) |
return 0; |
m_caller = JavaScriptCallFrame::create(debuggerContext, v8::Local<v8::Object>::Cast(callerFrame)); |
@@ -64,8 +64,8 @@ JavaScriptCallFrame* JavaScriptCallFrame::caller() |
int JavaScriptCallFrame::callV8FunctionReturnInt(const char* name) const |
{ |
v8::HandleScope handleScope(m_isolate); |
- v8::Context::Scope contextScope(m_debuggerContext.newLocal(m_isolate)); |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Context::Scope contextScope(v8::Local<v8::Context>::New(m_isolate, m_debuggerContext)); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, name))); |
v8::Local<v8::Value> result; |
if (!V8ScriptRunner::callInternalFunction(func, callFrame, 0, 0, m_isolate).ToLocal(&result) || !result->IsInt32()) |
@@ -76,8 +76,8 @@ int JavaScriptCallFrame::callV8FunctionReturnInt(const char* name) const |
String JavaScriptCallFrame::callV8FunctionReturnString(const char* name) const |
{ |
v8::HandleScope handleScope(m_isolate); |
- v8::Context::Scope contextScope(m_debuggerContext.newLocal(m_isolate)); |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Context::Scope contextScope(v8::Local<v8::Context>::New(m_isolate, m_debuggerContext)); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, name))); |
v8::Local<v8::Value> result; |
if (!V8ScriptRunner::callInternalFunction(func, callFrame, 0, 0, m_isolate).ToLocal(&result)) |
@@ -122,7 +122,7 @@ int JavaScriptCallFrame::functionColumn() const |
v8::Local<v8::Value> JavaScriptCallFrame::scopeChain() const |
{ |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, "scopeChain"))); |
v8::Local<v8::Array> scopeChain = v8::Local<v8::Array>::Cast(V8ScriptRunner::callInternalFunction(func, callFrame, 0, 0, m_isolate).ToLocalChecked()); |
v8::Local<v8::Array> result = v8::Array::New(m_isolate, scopeChain->Length()); |
@@ -133,7 +133,7 @@ v8::Local<v8::Value> JavaScriptCallFrame::scopeChain() const |
int JavaScriptCallFrame::scopeType(int scopeIndex) const |
{ |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, "scopeType"))); |
v8::Local<v8::Array> scopeType = v8::Local<v8::Array>::Cast(V8ScriptRunner::callInternalFunction(func, callFrame, 0, 0, m_isolate).ToLocalChecked()); |
return scopeType->Get(scopeIndex)->Int32Value(); |
@@ -141,7 +141,7 @@ int JavaScriptCallFrame::scopeType(int scopeIndex) const |
v8::Local<v8::String> JavaScriptCallFrame::scopeName(int scopeIndex) const |
{ |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, "scopeName"))); |
v8::Local<v8::Array> scopeType = v8::Local<v8::Array>::Cast(V8ScriptRunner::callInternalFunction(func, callFrame, 0, 0, m_isolate).ToLocalChecked()); |
return scopeType->Get(scopeIndex)->ToString(); |
@@ -149,7 +149,7 @@ v8::Local<v8::String> JavaScriptCallFrame::scopeName(int scopeIndex) const |
v8::Local<v8::Value> JavaScriptCallFrame::thisObject() const |
{ |
- return m_callFrame.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "thisObject")); |
+ return v8::Local<v8::Object>::New(m_isolate, m_callFrame)->Get(v8AtomicString(m_isolate, "thisObject")); |
} |
String JavaScriptCallFrame::stepInPositions() const |
@@ -160,8 +160,8 @@ String JavaScriptCallFrame::stepInPositions() const |
bool JavaScriptCallFrame::isAtReturn() const |
{ |
v8::HandleScope handleScope(m_isolate); |
- v8::Context::Scope contextScope(m_debuggerContext.newLocal(m_isolate)); |
- v8::Local<v8::Value> result = m_callFrame.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "isAtReturn")); |
+ v8::Context::Scope contextScope(v8::Local<v8::Context>::New(m_isolate, m_debuggerContext)); |
+ v8::Local<v8::Value> result = v8::Local<v8::Object>::New(m_isolate, m_callFrame)->Get(v8AtomicString(m_isolate, "isAtReturn")); |
if (result.IsEmpty() || !result->IsBoolean()) |
return false; |
return result->BooleanValue(); |
@@ -169,12 +169,12 @@ bool JavaScriptCallFrame::isAtReturn() const |
v8::Local<v8::Value> JavaScriptCallFrame::returnValue() const |
{ |
- return m_callFrame.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "returnValue")); |
+ return v8::Local<v8::Object>::New(m_isolate, m_callFrame)->Get(v8AtomicString(m_isolate, "returnValue")); |
} |
v8::Local<v8::Value> JavaScriptCallFrame::evaluateWithExceptionDetails(v8::Local<v8::Value> expression, v8::Local<v8::Value> scopeExtension) |
{ |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> evalFunction = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, "evaluate"))); |
v8::Local<v8::Value> argv[] = { |
expression, |
@@ -195,7 +195,7 @@ v8::Local<v8::Value> JavaScriptCallFrame::evaluateWithExceptionDetails(v8::Local |
v8::MaybeLocal<v8::Value> JavaScriptCallFrame::restart() |
{ |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> restartFunction = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, "restart"))); |
v8::Debug::SetLiveEditEnabled(m_isolate, true); |
v8::MaybeLocal<v8::Value> result = V8ScriptRunner::callInternalFunction(restartFunction, callFrame, 0, 0, m_isolate); |
@@ -205,7 +205,7 @@ v8::MaybeLocal<v8::Value> JavaScriptCallFrame::restart() |
v8::MaybeLocal<v8::Value> JavaScriptCallFrame::setVariableValue(int scopeNumber, v8::Local<v8::Value> variableName, v8::Local<v8::Value> newValue) |
{ |
- v8::Local<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
+ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
v8::Local<v8::Function> setVariableValueFunction = v8::Local<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, "setVariableValue"))); |
v8::Local<v8::Value> argv[] = { |
v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), |