summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSDocumentCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSDocumentCustom.cpp')
-rw-r--r--WebCore/bindings/js/JSDocumentCustom.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/WebCore/bindings/js/JSDocumentCustom.cpp b/WebCore/bindings/js/JSDocumentCustom.cpp
index 956327a..39a1fc5 100644
--- a/WebCore/bindings/js/JSDocumentCustom.cpp
+++ b/WebCore/bindings/js/JSDocumentCustom.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -39,11 +39,11 @@ using namespace JSC;
namespace WebCore {
-void JSDocument::mark()
+void JSDocument::markChildren(MarkStack& markStack)
{
- JSNode::mark();
- markDOMNodesForDocument(impl());
- markActiveObjectsForContext(*Heap::heap(this)->globalData(), impl());
+ JSNode::markChildren(markStack);
+ markDOMNodesForDocument(markStack, impl());
+ markActiveObjectsForContext(markStack, *Heap::heap(this)->globalData(), impl());
}
JSValue JSDocument::location(ExecState* exec) const
@@ -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.