summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/js/JSDOMWindowBase.cpp')
-rw-r--r--Source/WebCore/bindings/js/JSDOMWindowBase.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/Source/WebCore/bindings/js/JSDOMWindowBase.cpp b/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
index df01f77..584f610 100644
--- a/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
+++ b/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
@@ -45,21 +45,16 @@ namespace WebCore {
const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, 0 };
-JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData(PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
- : JSDOMGlobalObjectData(shell->world(), destroyJSDOMWindowBaseData)
- , impl(window)
- , shell(shell)
-{
-}
-
JSDOMWindowBase::JSDOMWindowBase(NonNullPassRefPtr<Structure> structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
- : JSDOMGlobalObject(structure, new JSDOMWindowBaseData(window, shell), shell)
+ : JSDOMGlobalObject(structure, shell->world(), shell)
+ , m_impl(window)
+ , m_shell(shell)
{
ASSERT(inherits(&s_info));
GlobalPropertyInfo staticGlobals[] = {
GlobalPropertyInfo(Identifier(globalExec(), "document"), jsNull(), DontDelete | ReadOnly),
- GlobalPropertyInfo(Identifier(globalExec(), "window"), d()->shell, DontDelete | ReadOnly)
+ GlobalPropertyInfo(Identifier(globalExec(), "window"), m_shell, DontDelete | ReadOnly)
};
addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
@@ -67,19 +62,19 @@ JSDOMWindowBase::JSDOMWindowBase(NonNullPassRefPtr<Structure> structure, PassRef
void JSDOMWindowBase::updateDocument()
{
- ASSERT(d()->impl->document());
+ ASSERT(m_impl->document());
ExecState* exec = globalExec();
- symbolTablePutWithAttributes(exec->globalData(), Identifier(exec, "document"), toJS(exec, this, d()->impl->document()), DontDelete | ReadOnly);
+ symbolTablePutWithAttributes(exec->globalData(), Identifier(exec, "document"), toJS(exec, this, m_impl->document()), DontDelete | ReadOnly);
}
ScriptExecutionContext* JSDOMWindowBase::scriptExecutionContext() const
{
- return d()->impl->document();
+ return m_impl->document();
}
String JSDOMWindowBase::crossDomainAccessErrorMessage(const JSGlobalObject* other) const
{
- return d()->shell->window()->impl()->crossDomainAccessErrorMessage(asJSDOMWindow(other)->impl());
+ return m_shell->window()->impl()->crossDomainAccessErrorMessage(asJSDOMWindow(other)->impl());
}
void JSDOMWindowBase::printErrorMessage(const String& message) const
@@ -170,7 +165,7 @@ JSValue JSDOMWindowBase::toStrictThisObject(ExecState*) const
JSDOMWindowShell* JSDOMWindowBase::shell() const
{
- return d()->shell;
+ return m_shell;
}
JSGlobalData* JSDOMWindowBase::commonJSGlobalData()
@@ -190,11 +185,6 @@ JSGlobalData* JSDOMWindowBase::commonJSGlobalData()
return globalData;
}
-void JSDOMWindowBase::destroyJSDOMWindowBaseData(void* jsDOMWindowBaseData)
-{
- delete static_cast<JSDOMWindowBaseData*>(jsDOMWindowBaseData);
-}
-
// JSDOMGlobalObject* is ignored, accessing a window in any context will
// use that DOMWindow's prototype chain.
JSValue toJS(ExecState* exec, JSDOMGlobalObject*, DOMWindow* domWindow)