diff options
author | Lars Knoll <[email protected]> | 2014-05-09 12:15:23 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2014-07-22 13:49:18 +0200 |
commit | dba56a752c932670c0e9461f106d2bc084276b6f (patch) | |
tree | 3a669663fa85dd3d61a83c29e8961b70ac53f046 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | 00fa9049112385f65ccdcad02b8712a32626d20c (diff) |
Convert remaining FunctionObject's to new constructor scheme
Change-Id: I440d5b128d0ee28566ebfa82c2505a4bd97bba6b
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 48 |
1 files changed, 4 insertions, 44 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index c3b4860730..1cbc803ebd 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -112,48 +112,6 @@ FunctionObject::Data::Data(InternalClass *ic) memberData[Index_Prototype] = Encode::undefined(); } -FunctionObject::FunctionObject(ExecutionContext *scope, String *name, bool createProto) - : Object(scope->d()->engine->functionClass) -{ - d()->scope = scope; - d()->function = 0; - init(name, createProto); -} - -FunctionObject::FunctionObject(ExecutionContext *scope, const QString &name, bool createProto) - : Object(scope->d()->engine->functionClass) -{ - d()->scope = scope; - d()->function = 0; - - Scope s(scope); - ScopedValue protectThis(s, this); - ScopedString n(s, s.engine->newString(name)); - init(n.getPointer(), createProto); -} - -FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValue name) - : Object(scope->d()->engine->functionClass) -{ - d()->scope = scope; - d()->function = 0; - - Scope s(scope); - ScopedValue protectThis(s, this); - ScopedString n(s, name); - init(n.getPointer(), false); -} - -FunctionObject::FunctionObject(InternalClass *ic) - : Object(ic) -{ - d()->scope = ic->engine->rootContext; - d()->function = 0; - - d()->needsActivation = false; - d()->strictMode = false; - memberData()[Index_Prototype] = Encode::undefined(); -} FunctionObject::Data::~Data() { @@ -288,8 +246,10 @@ ReturnedValue FunctionCtor::call(Managed *that, CallData *callData) return construct(that, callData); } -FunctionPrototype::FunctionPrototype(InternalClass *ic) - : FunctionObject(ic) +DEFINE_OBJECT_VTABLE(FunctionPrototype); + +FunctionPrototype::Data::Data(InternalClass *ic) + : FunctionObject::Data(ic) { } |