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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.h

Issue 2745313003: Move securityCheck out of V8WrapperInstantiationScope (Closed)
Patch Set: Address code review feedback Created 3 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WrapperCreationSecurityCheck_h
6 #define WrapperCreationSecurityCheck_h
7
8 #include "core/CoreExport.h"
9 #include "platform/wtf/Allocator.h"
10 #include "v8/include/v8.h"
11
12 namespace blink {
13
14 struct WrapperTypeInfo;
15
16 class CORE_EXPORT WrapperCreationSecurityCheck {
17 STATIC_ONLY(WrapperCreationSecurityCheck);
18
19 public:
20 using SecurityCheckFunction = void (*)(v8::Isolate*,
21 v8::Local<v8::Context>,
22 const WrapperTypeInfo*,
23 v8::Local<v8::Value>);
24
25 static void setSecurityCheckFunction(SecurityCheckFunction);
26
27 static void verifyContextAccessAndHandleCrossContextException(
28 v8::Isolate*,
29 v8::Local<v8::Context> creationContext,
30 const WrapperTypeInfo*,
31 v8::Local<v8::Value> crossContextException);
32
33 private:
34 static SecurityCheckFunction s_securityCheck;
35 };
36
37 } // namespace blink
38
39 #endif // WrapperCreationSecurityCheck_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698