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

Unified Diff: third_party/WebKit/Source/core/html/HTMLDocument.cpp

Issue 2616903002: Remove ScriptController::namedItemAdded/Removed (Closed)
Patch Set: temp Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLDocument.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLDocument.cpp b/third_party/WebKit/Source/core/html/HTMLDocument.cpp
index 76513b6f581817800fdbeb0f25e899758d47b328..358922baa38f90fd878572b784aeaed5cc82c6f4 100644
--- a/third_party/WebKit/Source/core/html/HTMLDocument.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDocument.cpp
@@ -54,6 +54,7 @@
#include "core/html/HTMLDocument.h"
#include "bindings/core/v8/ScriptController.h"
+#include "bindings/core/v8/WindowProxy.h"
#include "core/HTMLNames.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLBodyElement.h"
@@ -152,8 +153,11 @@ void HTMLDocument::addItemToMap(HashCountedSet<AtomicString>& map,
if (name.isEmpty())
return;
map.add(name);
- if (LocalFrame* f = frame())
- f->script().namedItemAdded(this, name);
+ if (LocalFrame* f = frame()) {
+ f->script()
+ .windowProxy(DOMWrapperWorld::mainWorld())
+ ->namedItemAdded(this, name);
+ }
}
void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map,
@@ -161,8 +165,11 @@ void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map,
if (name.isEmpty())
return;
map.remove(name);
- if (LocalFrame* f = frame())
- f->script().namedItemRemoved(this, name);
+ if (LocalFrame* f = frame()) {
+ f->script()
+ .windowProxy(DOMWrapperWorld::mainWorld())
+ ->namedItemRemoved(this, name);
+ }
}
void HTMLDocument::addNamedItem(const AtomicString& name) {
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698