| Index: third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.cpp b/third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fc62b6b7a794d1ea7605259ac6df70df13658850
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/WrapperCreationSecurityCheck.cpp
|
| @@ -0,0 +1,29 @@
|
| +// 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.
|
| +
|
| +#include "bindings/core/v8/WrapperCreationSecurityCheck.h"
|
| +
|
| +#include "bindings/core/v8/WrapperTypeInfo.h"
|
| +
|
| +namespace blink {
|
| +
|
| +WrapperCreationSecurityCheck::SecurityCheckFunction
|
| + WrapperCreationSecurityCheck::s_securityCheck = nullptr;
|
| +
|
| +void WrapperCreationSecurityCheck::setSecurityCheckFunction(
|
| + SecurityCheckFunction func) {
|
| + s_securityCheck = func;
|
| +}
|
| +
|
| +void WrapperCreationSecurityCheck::securityCheck(
|
| + v8::Isolate* isolate,
|
| + v8::Local<v8::Context> currentContext,
|
| + v8::Local<v8::Context> creationContext,
|
| + const WrapperTypeInfo* type,
|
| + v8::Local<v8::Value> crossContextException) {
|
| + (*s_securityCheck)(isolate, currentContext, creationContext, type,
|
| + crossContextException);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|