Move securityCheck out of V8WrapperInstantiationScope

Desktop / Chromium - adithyas [chromium.org] - 20 April 2017 13:07 EDT

Moving V8DOMWrapper.h/cpp to platform/bindings is blocked by V8WrapperInstantiationScope::securityCheck and V8WrapperInstantiationScope::convertException. Both of these methods use toLocalFrame/toDOMWindow, and cannot be moved to platform/.

This CL moves the security check into WrapperCreationSecurityCheck. WrapperCreationSecurityCheck only holds a function pointer and will be moved into platform/bindings. The implementation of the security check is moved to BindingSecurity (in bindings/core), and the function pointer is set to point to the implementation inside core/.

BUG=682322

Review-Url: https://codereview.chromium.org/2745313003 Cr-Original-Commit-Position: refs/heads/master@{#463621} Committed: https://chromium.googlesource.com/chromium/src/+/3f7eac384ee02371be4972ba0647082bf6599eb1 Review-Url: https://codereview.chromium.org/2745313003 Cr-Commit-Position: refs/heads/master@{#466029}

32ce982 Move securityCheck out of V8WrapperInstantiationScope
third_party/WebKit/Source/bindings/bindings.gni | 2 +
.../Source/bindings/core/v8/BindingSecurity.cpp | 63 ++++++++++++++++++++-
.../Source/bindings/core/v8/BindingSecurity.h | 18 ++++++
.../Source/bindings/core/v8/V8DOMWrapper.cpp | 66 +---------------------
.../WebKit/Source/bindings/core/v8/V8DOMWrapper.h | 49 +++++++++-------
.../Source/bindings/core/v8/V8Initializer.cpp | 3 +
.../core/v8/WrapperCreationSecurityCheck.cpp | 41 ++++++++++++++
.../core/v8/WrapperCreationSecurityCheck.h | 46 +++++++++++++++
8 files changed, 204 insertions(+), 84 deletions(-)

Upstream: git.chromium.org


  • Share