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

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

Issue 2713623002: v8binding: Makes ToV8(window) work without a frame. (Closed)
Patch Set: . Created 3 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/ToV8.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ToV8.cpp b/third_party/WebKit/Source/bindings/core/v8/ToV8.cpp
index 6053c2e618c0b6c666812b4f6c8a8caf2c129915..d9223b8cca358377cdc5bacaa4e2c3188b38d13f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ToV8.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ToV8.cpp
@@ -19,14 +19,8 @@ v8::Local<v8::Value> ToV8(DOMWindow* window,
if (UNLIKELY(!window))
return v8::Null(isolate);
- // Initializes environment of a frame, and return the global object
- // of the frame.
- Frame* frame = window->frame();
- if (!frame)
- return v8Undefined();
-
- return frame->windowProxy(DOMWrapperWorld::current(isolate))
- ->globalProxyIfNotDetached();
+
+ return window->globalProxy(DOMWrapperWorld::current(isolate));
}
v8::Local<v8::Value> ToV8(EventTarget* impl,

Powered by Google App Engine
This is Rietveld 408576698