| Index: third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.h b/third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d99009a2f16ea8453c1109073dba745a12359027
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef WrapperCreationSecurityCheck_h
|
| +#define WrapperCreationSecurityCheck_h
|
| +
|
| +#include "core/CoreExport.h"
|
| +#include "platform/wtf/Allocator.h"
|
| +#include "v8/include/v8.h"
|
| +
|
| +namespace blink {
|
| +
|
| +struct WrapperTypeInfo;
|
| +
|
| +class CORE_EXPORT WrapperCreationSecurityCheck {
|
| + STATIC_ONLY(WrapperCreationSecurityCheck);
|
| +
|
| + public:
|
| + using SecurityCheckFunction = void (*)(v8::Isolate*,
|
| + v8::Local<v8::Context>,
|
| + v8::Local<v8::Context>,
|
| + const WrapperTypeInfo*,
|
| + v8::Local<v8::Value>);
|
| +
|
| + static void setSecurityCheckFunction(SecurityCheckFunction);
|
| +
|
| + static void securityCheck(v8::Isolate*,
|
| + v8::Local<v8::Context> currentContext,
|
| + v8::Local<v8::Context> creationContext,
|
| + const WrapperTypeInfo*,
|
| + v8::Local<v8::Value> crossContextException);
|
| +
|
| + private:
|
| + static SecurityCheckFunction s_securityCheck;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // WrapperCreationSecurityCheck_h
|
|
|