| 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
|
|
|