Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h

Issue 2745313003: Move securityCheck out of V8WrapperInstantiationScope (Closed)
Patch Set: Stop unecessary includes of BindingSecurity.h Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b820bbf4148dec0c8949f963cdaf59e63de16db9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h
+++ b/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h
@@ -118,6 +118,28 @@ class CORE_EXPORT BindingSecurity {
static void failedAccessCheckFor(v8::Isolate*, const Frame* target);
+ // 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*,
Yuki 2017/03/16 14:05:55 Do you really want to expose this function in publ
adithyas 2017/03/28 20:35:41 Nope, made it private.
+ v8::Local<v8::Context> currentContext,
+ v8::Local<v8::Context> creationContext,
+ const char* interfaceName);
+
+ static void securityCheckForClassesWithAccessCheckCallbacks(
Yuki 2017/03/16 14:05:55 Does "Classes" here mean IDL interface? If so, it
adithyas 2017/03/28 20:35:40 Yes, I meant IDL interface here and not a C++ clas
+ v8::Isolate*,
+ v8::Local<v8::Context> currentContext,
+ v8::Local<v8::Context> creationContext,
+ const char* interfaceName,
+ v8::Local<v8::Value> crossContextException);
+
+ static void securityCheckForClassesWithoutAccessCheckCallbacks(
+ v8::Isolate*,
+ v8::Local<v8::Context> currentContext,
+ v8::Local<v8::Context> creationContext,
+ const char* interfaceName,
+ 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

Powered by Google App Engine
This is Rietveld 408576698