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

Unified Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp

Issue 1638563002: DevTools: migrate ScriptFunctionCall off ScriptValue (to be inlined into the InjectedScript.cpp). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/core/inspector/MainThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
index 04638f0efa54fd05937124b9b312d43b7fbeda40..b56414d158308265190f877c8e3ae73d76433504 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
@@ -30,7 +30,9 @@
#include "core/inspector/MainThreadDebugger.h"
+#include "bindings/core/v8/BindingSecurity.h"
#include "bindings/core/v8/DOMWrapperWorld.h"
+#include "bindings/core/v8/V8Window.h"
#include "core/frame/LocalFrame.h"
#include "core/inspector/InspectorTaskRunner.h"
#include "core/inspector/v8/V8Debugger.h"
@@ -122,4 +124,12 @@ void MainThreadDebugger::quitMessageLoopOnPause()
m_clientMessageLoop->quitNow();
}
+bool MainThreadDebugger::canAccessContext(v8::Local<v8::Context> context)
+{
+ if (context.IsEmpty())
+ return false;
+ DOMWindow* window = toDOMWindow(context->GetIsolate(), context->Global());
+ return window && BindingSecurity::shouldAllowAccessTo(context->GetIsolate(), callingDOMWindow(context->GetIsolate()), window, DoNotReportSecurityError);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698