Chromium Code Reviews| 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..d72b24db27584292998a168a7865786808b85b6e 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,20 @@ class CORE_EXPORT BindingSecurity { |
| static void failedAccessCheckFor(v8::Isolate*, const Frame* target); |
| + // Returns true if the current context has access to creationContext, and |
| + // throws a SecurityError if it doesn't have access. |
|
Yuki
2017/04/06 08:26:15
Probably it's good to write that these two functio
adithyas
2017/04/06 19:04:20
Done.
|
| + static bool shouldEnterCreationContext(v8::Isolate*, |
|
Yuki
2017/04/06 08:26:15
Can we follow the existing convention like the fol
adithyas
2017/04/06 19:04:20
Done.
|
| + 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 |