| 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) {
|
|
|