Index: third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp b/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp |
index a9f64e96020558eca0d06eced00495af1eaf3bda..186f6a165a308c8b33d6afa9eb905d74b7421c16 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp |
@@ -36,6 +36,7 @@ |
#include "core/frame/LocalFrame.h" |
#include "core/frame/Settings.h" |
#include "core/html/HTMLFrameElementBase.h" |
+#include "core/workers/MainThreadWorkletGlobalScope.h" |
#include "platform/weborigin/SecurityOrigin.h" |
namespace blink { |
@@ -121,6 +122,15 @@ bool BindingSecurity::shouldAllowAccessTo(v8::Isolate* isolate, const LocalDOMWi |
return canAccessFrame(isolate, accessingWindow, frame->securityContext()->getSecurityOrigin(), frame->domWindow(), reportingOption); |
} |
+bool BindingSecurity::shouldAllowAccessTo(v8::Isolate* isolate, const LocalDOMWindow* accessingWindow, const MainThreadWorkletGlobalScope* target, SecurityReportingOption reportingOption) |
+{ |
+ ASSERT(target); |
+ const Frame* frame = target->frame(); |
+ if (!frame || !frame->securityContext()) |
+ return false; |
+ return canAccessFrame(isolate, accessingWindow, frame->securityContext()->getSecurityOrigin(), frame->domWindow(), reportingOption); |
+} |
+ |
bool BindingSecurity::shouldAllowAccessTo(v8::Isolate* isolate, const LocalDOMWindow* accessingWindow, const Node* target, ExceptionState& exceptionState) |
{ |
if (!target) |