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

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

Issue 2135443002: DevTools: explicitly use debugger context when processing objects from DebuggerScript.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed Created 4 years, 5 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/InjectedScript.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
index cd467e6564adaf986763366b488a4c878fe7d34c..adb6f5a6af5a0239b79844761819941cd841206e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -186,7 +186,6 @@ bool InjectedScript::wrapPropertyInArray(ErrorString* errorString, v8::Local<v8:
function.appendArgument(array);
function.appendArgument(property);
function.appendArgument(groupName);
- function.appendArgument(canAccessInspectedWindow());
function.appendArgument(forceValueType);
function.appendArgument(generatePreview);
bool hadException = false;
@@ -199,7 +198,6 @@ bool InjectedScript::wrapObjectsInArray(ErrorString* errorString, v8::Local<v8::
V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "wrapObjectsInArray");
function.appendArgument(array);
function.appendArgument(groupName);
- function.appendArgument(canAccessInspectedWindow());
function.appendArgument(forceValueType);
function.appendArgument(generatePreview);
bool hadException = false;
@@ -212,7 +210,6 @@ v8::MaybeLocal<v8::Value> InjectedScript::wrapValue(ErrorString* errorString, v8
V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "wrapObject");
function.appendArgument(value);
function.appendArgument(groupName);
- function.appendArgument(canAccessInspectedWindow());
function.appendArgument(forceValueType);
function.appendArgument(generatePreview);
bool hadException = false;
@@ -226,7 +223,6 @@ std::unique_ptr<protocol::Runtime::RemoteObject> InjectedScript::wrapTable(v8::L
{
v8::HandleScope handles(m_context->isolate());
V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "wrapTable");
- function.appendArgument(canAccessInspectedWindow());
function.appendArgument(table);
if (columns.IsEmpty())
function.appendArgument(false);
@@ -270,14 +266,6 @@ void InjectedScript::setCustomObjectFormatterEnabled(bool enabled)
DCHECK(!hadException);
}
-bool InjectedScript::canAccessInspectedWindow() const
-{
- v8::Local<v8::Context> callingContext = m_context->isolate()->GetCallingContext();
- if (callingContext.IsEmpty())
- return true;
- return m_context->debugger()->client()->callingContextCanAccessContext(callingContext, m_context->context());
-}
-
v8::Local<v8::Value> InjectedScript::v8Value() const
{
return m_value.Get(m_context->isolate());

Powered by Google App Engine
This is Rietveld 408576698