diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp index 956327a3e..493aaeaa8 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp @@ -56,8 +56,7 @@ JSValue JSDocument::location(ExecState* exec) const 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); + JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, globalObject()), globalObject(), location); cacheDOMObjectWrapper(exec->globalData(), location, jsLocation); return jsLocation; } @@ -80,7 +79,7 @@ void JSDocument::setLocation(ExecState* exec, JSValue value) frame->loader()->scheduleLocationChange(str, activeFrame->loader()->outgoingReferrer(), !activeFrame->script()->anyPageIsProcessingUserGesture(), false, userGesture); } -JSValue toJS(ExecState* exec, Document* document) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* document) { if (!document) return jsNull(); @@ -90,13 +89,13 @@ JSValue toJS(ExecState* exec, Document* document) return wrapper; if (document->isHTMLDocument()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, HTMLDocument, document); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLDocument, document); #if ENABLE(SVG) else if (document->isSVGDocument()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, SVGDocument, document); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, SVGDocument, document); #endif else - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, Document, document); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, Document, document); // Make sure the document is kept around by the window object, and works right with the // back/forward cache. |