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

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

Issue 2713623002: v8binding: Makes ToV8(window) work without a frame. (Closed)
Patch Set: Added a TODO comment. 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/ToV8ForCore.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ToV8ForCore.cpp b/third_party/WebKit/Source/bindings/core/v8/ToV8ForCore.cpp
index 4db3bc58d85928173bb9e498cbf5e78104b3f797..71e07c22380296ea54a16b1e9c30593ee0395f7a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ToV8ForCore.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ToV8ForCore.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->GetFrame();
- if (!frame)
- return V8Undefined();
-
- return frame->GetWindowProxy(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