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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp

Issue 1769273004: Remove V8RecrusionScope, cleanup call sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, a couple more tests Created 4 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: third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
index 03274ad89beb85cfb05577d5b8f0af42024cb5a8..8b2fd2bced7a22c9f8b6af23b05ac7f514e63134 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
@@ -30,6 +30,7 @@
#include "platform/v8_inspector/V8FunctionCall.h"
+#include "platform/v8_inspector/V8DebuggerImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
#include "platform/v8_inspector/public/V8DebuggerClient.h"
#include "wtf/PassOwnPtr.h"
@@ -38,8 +39,8 @@
namespace blink {
-V8FunctionCall::V8FunctionCall(V8DebuggerClient* client, v8::Local<v8::Context> context, v8::Local<v8::Value> value, const String& name)
- : m_client(client)
+V8FunctionCall::V8FunctionCall(V8DebuggerImpl* debugger, v8::Local<v8::Context> context, v8::Local<v8::Value> value, const String& name)
+ : m_debugger(debugger)
, m_context(context)
, m_name(toV8String(context->GetIsolate(), name))
, m_value(value)
@@ -89,6 +90,10 @@ v8::Local<v8::Value> V8FunctionCall::call()
v8::Local<v8::Value> V8FunctionCall::callWithoutExceptionHandling()
{
+ // TODO(dgozman): get rid of this check.
+ if (!m_debugger->client()->isExecutionAllowed())
pfeldman 2016/03/08 20:23:21 Move into callFunction?
dgozman 2016/03/09 22:01:53 Done.
+ return v8::Local<v8::Value>();
+
v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_value);
v8::Local<v8::Value> value;
if (!thisObject->Get(m_context, m_name).ToLocal(&value))
@@ -104,7 +109,7 @@ v8::Local<v8::Value> V8FunctionCall::callWithoutExceptionHandling()
}
v8::Local<v8::Value> result;
- if (!m_client->callFunction(function, m_context, thisObject, m_arguments.size(), info.get()).ToLocal(&result))
+ if (!m_debugger->callFunction(function, m_context, thisObject, m_arguments.size(), info.get()).ToLocal(&result))
return v8::Local<v8::Value>();
return result;
}

Powered by Google App Engine
This is Rietveld 408576698