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

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

Issue 1323453005: Modifies V8WrapperInstantiationScope::SecurityCheck to only call BindingSecurity::shouldAllowAccess… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8DOMWrapper.cpp
diff --git a/Source/bindings/core/v8/V8DOMWrapper.cpp b/Source/bindings/core/v8/V8DOMWrapper.cpp
index feedad6cec93ab07a5f39de2a73c13c5aae1168b..e4a7fa6ca27d1d62e4617e82e5f55bc93bba792e 100644
--- a/Source/bindings/core/v8/V8DOMWrapper.cpp
+++ b/Source/bindings/core/v8/V8DOMWrapper.cpp
@@ -136,7 +136,13 @@ void V8WrapperInstantiationScope::SecurityCheck(v8::Isolate* isolate, v8::Local<
// If the context is different, we need to make sure that the current
// context has access to the creation context.
Frame* frame = toFrameIfNotDetached(contextForWrapper);
- RELEASE_ASSERT(!frame || BindingSecurity::shouldAllowAccessToFrame(isolate, frame, DoNotReportSecurityError));
+ if (!frame)
+ return;
+ const DOMWrapperWorld& currentWorld = DOMWrapperWorld::world(m_context);
+ RELEASE_ASSERT(currentWorld.worldId() == DOMWrapperWorld::world(contextForWrapper).worldId());
haraken 2015/09/09 15:41:42 Does this need to be RELEASE_ASSERT?
epertoso 2015/09/09 15:52:11 I think it's a valid assumption.
+ if (currentWorld.isMainWorld()) {
+ RELEASE_ASSERT(BindingSecurity::shouldAllowAccessToFrame(isolate, frame, DoNotReportSecurityError));
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698