summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSDOMBinding.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSDOMBinding.h')
-rw-r--r--WebCore/bindings/js/JSDOMBinding.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/WebCore/bindings/js/JSDOMBinding.h b/WebCore/bindings/js/JSDOMBinding.h
index 209be3f..215e09a 100644
--- a/WebCore/bindings/js/JSDOMBinding.h
+++ b/WebCore/bindings/js/JSDOMBinding.h
@@ -58,7 +58,10 @@ namespace WebCore {
// updated to store a globalObject pointer.
class DOMObjectWithGlobalPointer : public DOMObject {
public:
- JSDOMGlobalObject* globalObject() const { return static_cast<JSDOMGlobalObject*>(getAnonymousValue(GlobalObjectSlot).asCell()); }
+ JSDOMGlobalObject* globalObject() const
+ {
+ return static_cast<JSDOMGlobalObject*>(DOMObject::globalObject());
+ }
ScriptExecutionContext* scriptExecutionContext() const
{
@@ -72,19 +75,14 @@ namespace WebCore {
}
protected:
- static const unsigned AnonymousSlotCount = 1 + DOMObject::AnonymousSlotCount;
- static const unsigned GlobalObjectSlot = AnonymousSlotCount - 1;
-
DOMObjectWithGlobalPointer(NonNullPassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject)
- : DOMObject(structure)
+ : DOMObject(globalObject, structure)
{
// FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create
// new JavaScript objects on detached windows due to DOMWindow::document()
// needing to reach through the frame to get to the Document*. See bug 27640.
// ASSERT(globalObject->scriptExecutionContext());
- putAnonymousValue(GlobalObjectSlot, globalObject);
}
- virtual ~DOMObjectWithGlobalPointer() { }
};
// Base class for all constructor objects in the JSC bindings.