summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-07-31 11:52:57 +1000
committerWarwick Allison <warwick.allison@nokia.com>2009-07-31 11:52:57 +1000
commitaa9cf406d62004519ad54596e1c391f9a6439210 (patch)
treedd562b9c296981f2761b76623911be8496c7af84 /src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp
parent987aec28b950e1c9817a20a9dd71afc071cd93ea (diff)
parent56b6a5924008ab5cdbae36e9662eddba923acd5e (diff)
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp11
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.