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

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: Synced. 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 4bcb14e579041b04bd6a8c110a3e0b374f3f36dd..f50154fc5f688d6a14c42bbf4550985ce63dbff3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -344,33 +344,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