summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp
index 495bd53a1..25a5cb2e8 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp
@@ -38,21 +38,15 @@ namespace WebCore {
const ClassInfo JSMessageChannelConstructor::s_info = { "MessageChannelConstructor", 0, 0, 0 };
JSMessageChannelConstructor::JSMessageChannelConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
- : DOMObject(JSMessageChannelConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
- , m_globalObject(globalObject)
+ : DOMConstructorObject(JSMessageChannelConstructor::createStructure(globalObject->objectPrototype()), globalObject)
{
- putDirect(exec->propertyNames().prototype, JSMessageChannelPrototype::self(exec, exec->lexicalGlobalObject()), None);
+ putDirect(exec->propertyNames().prototype, JSMessageChannelPrototype::self(exec, globalObject), None);
}
JSMessageChannelConstructor::~JSMessageChannelConstructor()
{
}
-ScriptExecutionContext* JSMessageChannelConstructor::scriptExecutionContext() const
-{
- return m_globalObject->scriptExecutionContext();
-}
-
ConstructType JSMessageChannelConstructor::getConstructData(ConstructData& constructData)
{
constructData.native.function = construct;
@@ -61,18 +55,12 @@ ConstructType JSMessageChannelConstructor::getConstructData(ConstructData& const
JSObject* JSMessageChannelConstructor::construct(ExecState* exec, JSObject* constructor, const ArgList&)
{
- ScriptExecutionContext* context = static_cast<JSMessageChannelConstructor*>(constructor)->scriptExecutionContext();
+ JSMessageChannelConstructor* jsConstructor = static_cast<JSMessageChannelConstructor*>(constructor);
+ ScriptExecutionContext* context = jsConstructor->scriptExecutionContext();
if (!context)
return throwError(exec, ReferenceError, "MessageChannel constructor associated document is unavailable");
- return asObject(toJS(exec, MessageChannel::create(context)));
-}
-
-void JSMessageChannelConstructor::mark()
-{
- DOMObject::mark();
- if (!m_globalObject->marked())
- m_globalObject->mark();
+ return asObject(toJS(exec, jsConstructor->globalObject(), MessageChannel::create(context)));
}
} // namespace WebCore