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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 1858613002: bindings: Makes the window object be the inner global object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed a review comment. Created 4 years, 8 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: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
index c75d51b1c76c1653d30b15f8e06a61a6062530b7..907eb9d428c3f1486802cef3978c60bdaa8dcae9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -349,33 +349,4 @@ void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::Pro
}
}
-static bool securityCheck(v8::Local<v8::Object> host)
-{
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::Local<v8::Object> window = V8Window::findInstanceInPrototypeChain(host, isolate);
- if (window.IsEmpty())
- return false; // the frame is gone.
-
- DOMWindow* targetWindow = V8Window::toImpl(window);
- ASSERT(targetWindow);
- if (!targetWindow->isLocalDOMWindow())
- return false;
-
- LocalFrame* target = toLocalDOMWindow(targetWindow)->frame();
- if (!target)
- return false;
-
- // Notify the loader's client if the initial document has been accessed.
- if (target->loader().stateMachine()->isDisplayingInitialEmptyDocument())
- target->loader().didAccessInitialDocument();
-
- return BindingSecurity::shouldAllowAccessTo(isolate, callingDOMWindow(isolate), targetWindow, DoNotReportSecurityError);
-}
-
-bool V8Window::securityCheckCustom(v8::Local<v8::Context> accessingContext, v8::Local<v8::Object> accessedObject, v8::Local<v8::Value> data)
-{
- // TODO(jochen): Take accessingContext into account.
- return securityCheck(accessedObject);
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698