diff options
Diffstat (limited to 'WebCore/bindings/js/JSDocumentCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSDocumentCustom.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/WebCore/bindings/js/JSDocumentCustom.cpp b/WebCore/bindings/js/JSDocumentCustom.cpp index 596b78f..c432aea 100644 --- a/WebCore/bindings/js/JSDocumentCustom.cpp +++ b/WebCore/bindings/js/JSDocumentCustom.cpp @@ -20,7 +20,6 @@ #include "config.h" #include "JSDocument.h" -#include "DOMWindow.h" #include "ExceptionCode.h" #include "Frame.h" #include "FrameLoader.h" @@ -28,9 +27,6 @@ #include "JSDOMWindowCustom.h" #include "JSHTMLDocument.h" #include "JSLocation.h" -#include "JSNodeList.h" -#include "Location.h" -#include "NodeList.h" #include "ScriptController.h" #if ENABLE(SVG) @@ -44,7 +40,7 @@ namespace WebCore { void JSDocument::mark() { - JSEventTargetNode::mark(); + JSNode::mark(); markDOMNodesForDocument(impl()); markActiveObjectsForContext(*Heap::heap(this)->globalData(), impl()); } @@ -55,14 +51,7 @@ JSValuePtr JSDocument::location(ExecState* exec) const if (!frame) return jsNull(); - Location* location = frame->domWindow()->location(); - if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), location)) - return wrapper; - - JSDOMWindow* window = static_cast<JSDOMWindow*>(exec->lexicalGlobalObject()); - JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, window), location); - cacheDOMObjectWrapper(exec->globalData(), location, jsLocation); - return jsLocation; + return toJS(exec, frame->domWindow()->location()); } void JSDocument::setLocation(ExecState* exec, JSValuePtr value) |