diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp index c7d4e360c..27cc1db83 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp @@ -36,15 +36,17 @@ using namespace JSC; const ClassInfo JSWebKitPointConstructor::s_info = { "WebKitPointConstructor", 0, 0, 0 }; -JSWebKitPointConstructor::JSWebKitPointConstructor(ExecState* exec) - : DOMObject(JSWebKitPointConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) +JSWebKitPointConstructor::JSWebKitPointConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitPointConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitPointPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitPointPrototype::self(exec, globalObject), None); putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); } -static JSObject* constructWebKitPoint(ExecState* exec, JSObject*, const ArgList& args) +static JSObject* constructWebKitPoint(ExecState* exec, JSObject* constructor, const ArgList& args) { + JSWebKitPointConstructor* jsConstructor = static_cast<JSWebKitPointConstructor*>(constructor); + float x = 0; float y = 0; if (args.size() >= 2) { @@ -55,7 +57,7 @@ static JSObject* constructWebKitPoint(ExecState* exec, JSObject*, const ArgList& if (isnan(y)) y = 0; } - return asObject(toJS(exec, WebKitPoint::create(x, y))); + return asObject(toJS(exec, jsConstructor->globalObject(), WebKitPoint::create(x, y))); } JSC::ConstructType JSWebKitPointConstructor::getConstructData(JSC::ConstructData& constructData) |