| Index: Source/bindings/core/v8/V8DOMWrapper.cpp
|
| diff --git a/Source/bindings/core/v8/V8DOMWrapper.cpp b/Source/bindings/core/v8/V8DOMWrapper.cpp
|
| index d1d463530fce504e16c7315e5d844489bfd81409..eb747326039c3202f7ea55492bf07d24f39a1585 100644
|
| --- a/Source/bindings/core/v8/V8DOMWrapper.cpp
|
| +++ b/Source/bindings/core/v8/V8DOMWrapper.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "bindings/core/v8/V8Binding.h"
|
| #include "bindings/core/v8/V8HTMLCollection.h"
|
| #include "bindings/core/v8/V8HTMLDocument.h"
|
| +#include "bindings/core/v8/V8Location.h"
|
| #include "bindings/core/v8/V8ObjectConstructor.h"
|
| #include "bindings/core/v8/V8PerContextData.h"
|
| #include "bindings/core/v8/V8PerIsolateData.h"
|
| @@ -72,7 +73,12 @@ static v8::Local<v8::Object> wrapInShadowTemplate(v8::Local<v8::Object> wrapper,
|
|
|
| v8::Local<v8::Object> V8DOMWrapper::createWrapper(v8::Isolate* isolate, v8::Local<v8::Object> creationContext, const WrapperTypeInfo* type, ScriptWrappable* scriptWrappable)
|
| {
|
| - V8WrapperInstantiationScope scope(creationContext, isolate);
|
| + ASSERT(!type->equals(&V8Window::wrapperTypeInfo));
|
| + // According to https://html.spec.whatwg.org/multipage/browsers.html#security-location,
|
| + // cross-origin script access to a few properties of Location is allowed.
|
| + // Location already implements the necessary security checks.
|
| + bool withSecurityCheck = !type->equals(&V8Location::wrapperTypeInfo);
|
| + V8WrapperInstantiationScope scope(creationContext, isolate, withSecurityCheck);
|
|
|
| V8PerContextData* perContextData = V8PerContextData::from(scope.context());
|
| v8::Local<v8::Object> wrapper;
|
|
|