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

Unified Diff: Source/bindings/core/v8/V8DOMWrapper.cpp

Issue 1262353002: Add access checks to V8WrapperInstationScope. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/V8DOMWrapper.cpp
diff --git a/Source/bindings/core/v8/V8DOMWrapper.cpp b/Source/bindings/core/v8/V8DOMWrapper.cpp
index d1d463530fce504e16c7315e5d844489bfd81409..ff24539d9706f207a76f2391a95b8ec7220a6b4e 100644
--- a/Source/bindings/core/v8/V8DOMWrapper.cpp
+++ b/Source/bindings/core/v8/V8DOMWrapper.cpp
@@ -34,6 +34,7 @@
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8HTMLCollection.h"
#include "bindings/core/v8/V8HTMLDocument.h"
+#include "bindings/core/v8/V8Location.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "bindings/core/v8/V8PerContextData.h"
#include "bindings/core/v8/V8PerIsolateData.h"
@@ -72,7 +73,8 @@ static v8::Local<v8::Object> wrapInShadowTemplate(v8::Local<v8::Object> wrapper,
v8::Local<v8::Object> V8DOMWrapper::createWrapper(v8::Isolate* isolate, v8::Local<v8::Object> creationContext, const WrapperTypeInfo* type, ScriptWrappable* scriptWrappable)
{
- V8WrapperInstantiationScope scope(creationContext, isolate);
+ bool withSecurityCheck = !type->equals(&V8Window::wrapperTypeInfo) && !type->equals(&V8Location::wrapperTypeInfo);
haraken 2015/07/30 10:43:36 I guess this might regress performance. As comment
Yuki 2015/07/30 11:00:54 It seems that the CL is enabling the security chec
haraken 2015/07/30 11:08:06 Thanks, that totally makes sense to me. - Remove
+ V8WrapperInstantiationScope scope(creationContext, isolate, withSecurityCheck);
V8PerContextData* perContextData = V8PerContextData::from(scope.context());
v8::Local<v8::Object> wrapper;
« Source/bindings/core/v8/V8DOMWrapper.h ('K') | « Source/bindings/core/v8/V8DOMWrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698