| Index: third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h b/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h
|
| index 8a85eec582edc220eb3532e2a6e398037feac7b6..5e908c999aeb3faa0c49bd9b6b71977d76c354cf 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h
|
| @@ -44,6 +44,7 @@ class Frame;
|
| class LocalDOMWindow;
|
| class Location;
|
| class Node;
|
| +struct WrapperTypeInfo;
|
|
|
| class CORE_EXPORT BindingSecurity {
|
| STATIC_ONLY(BindingSecurity);
|
| @@ -118,6 +119,25 @@ class CORE_EXPORT BindingSecurity {
|
|
|
| static void failedAccessCheckFor(v8::Isolate*, const Frame* target);
|
|
|
| + // The following two functions were written to be called by
|
| + // V8WrapperInstantiationScope before entering and after exiting an object's
|
| + // creation context during wrapper creation.
|
| +
|
| + // Returns true if the current context has access to creationContext, and
|
| + // throws a SecurityError if it doesn't have access.
|
| + static bool shouldAllowAccessToCreationContext(
|
| + v8::Isolate*,
|
| + v8::Local<v8::Context> creationContext,
|
| + const WrapperTypeInfo*);
|
| +
|
| + static void rethrowCrossContextException(
|
| + v8::Isolate*,
|
| + v8::Local<v8::Context> creationContext,
|
| + const WrapperTypeInfo*,
|
| + v8::Local<v8::Value> crossContextException);
|
| +
|
| + static void initWrapperCreationSecurityCheck();
|
| +
|
| private:
|
| // Returns true if |accessingWindow| is allowed named access to |targetWindow|
|
| // because they're the same origin. Note that named access should be allowed
|
|
|