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

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

Issue 2745313003: Move securityCheck out of V8WrapperInstantiationScope (Closed)
Patch Set: Move functions into static class and remove flag bit 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 v8::Local<v8::Context>,
23 const WrapperTypeInfo*,
24 v8::Local<v8::Value>);
25
26 static void setSecurityCheckFunction(SecurityCheckFunction);
27
28 static void securityCheck(v8::Isolate*,
29 v8::Local<v8::Context> currentContext,
30 v8::Local<v8::Context> creationContext,
31 const WrapperTypeInfo*,
32 v8::Local<v8::Value> crossContextException);
33
34 private:
35 static SecurityCheckFunction s_securityCheck;
36 };
37
38 } // namespace blink
39
40 #endif // WrapperCreationSecurityCheck_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698