| 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 7d0c469a3bc98c838457785348369ec622ba7635..1dcbe9163c97701d56f56a0cef98bffef829f781 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,17 @@ class CORE_EXPORT BindingSecurity {
|
|
|
| static void failedAccessCheckFor(v8::Isolate*, const Frame* target);
|
|
|
| + // Checks if currentContext has access to creationContext, and throws a
|
| + // SecurityError if it doesn't have access. If it does have access, any
|
| + // previously caught cross context exception (which was thrown in the creation
|
| + // context) is rethrown in the current context.
|
| + static void wrapperCreationSecurityCheck(
|
| + v8::Isolate*,
|
| + v8::Local<v8::Context> currentContext,
|
| + v8::Local<v8::Context> creationContext,
|
| + const WrapperTypeInfo*,
|
| + v8::Local<v8::Value> crossContextException);
|
| +
|
| private:
|
| // Returns true if |accessingWindow| is allowed named access to |targetWindow|
|
| // because they're the same origin. Note that named access should be allowed
|
| @@ -132,6 +144,14 @@ class CORE_EXPORT BindingSecurity {
|
| friend class V8Window;
|
| static bool shouldAllowNamedAccessTo(const DOMWindow* accessingWindow,
|
| const DOMWindow* targetWindow);
|
| +
|
| + // Returns true if the creation context can be entered from the current
|
| + // context. If the creation context cannot be entered, a security error is
|
| + // thrown and this method returns false.
|
| + static bool canEnterCreationContext(v8::Isolate*,
|
| + v8::Local<v8::Context> currentContext,
|
| + v8::Local<v8::Context> creationContext,
|
| + ExceptionState&);
|
| };
|
|
|
| } // namespace blink
|
|
|