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

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

Issue 2617733004: binding: Changes the association among global-proxy/global/window-instance. (Closed)
Patch Set: Addressed review comments. Created 3 years, 10 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
deleted file mode 100644
index 42889491ff216295e7912e8a80b7e652bf8828b5..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/bindings/core/v8/ToV8.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "bindings/core/v8/ToV8.h"
-
-#include "bindings/core/v8/WindowProxy.h"
-#include "core/events/EventTarget.h"
-#include "core/frame/DOMWindow.h"
-#include "core/frame/Frame.h"
-
-namespace blink {
-
-v8::Local<v8::Value> ToV8(DOMWindow* window,
- v8::Local<v8::Object> creationContext,
- v8::Isolate* isolate) {
- // Notice that we explicitly ignore creationContext because the DOMWindow
- // has its own creationContext.
-
- 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))
- ->globalIfNotDetached();
-}
-
-v8::Local<v8::Value> ToV8(EventTarget* impl,
- v8::Local<v8::Object> creationContext,
- v8::Isolate* isolate) {
- if (UNLIKELY(!impl))
- return v8::Null(isolate);
-
- if (impl->interfaceName() == EventTargetNames::DOMWindow)
- return ToV8(static_cast<DOMWindow*>(impl), creationContext, isolate);
- return ToV8(static_cast<ScriptWrappable*>(impl), creationContext, isolate);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ToV8.h ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698