aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-05-07 13:33:24 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-07-22 13:49:12 +0200
commit33593f00e84e6fb05191e9bb88000566c0c96426 (patch)
tree127877f1719689659a8ec6cea669ad5d38ec0903 /src/qml/jsruntime/qv4functionobject.cpp
parent9afc7d9a53ad86e548e2d239ff012bed15eb52ba (diff)
Get rid of StringRef
Remove the Ref classes, as they won't be required anymore once Managed and Managed::Data are separated. Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 236e4be219..bc6cd45f13 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -74,7 +74,7 @@ using namespace QV4;
DEFINE_OBJECT_VTABLE(FunctionObject);
-FunctionObject::FunctionObject(ExecutionContext *scope, const StringRef name, bool createProto)
+FunctionObject::FunctionObject(ExecutionContext *scope, String *name, bool createProto)
: Object(scope->d()->engine->functionClass)
{
d()->scope = scope;
@@ -91,7 +91,7 @@ FunctionObject::FunctionObject(ExecutionContext *scope, const QString &name, boo
Scope s(scope);
ScopedValue protectThis(s, this);
ScopedString n(s, s.engine->newString(name));
- init(n, createProto);
+ init(n.getPointer(), createProto);
}
FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValue name)
@@ -103,7 +103,7 @@ FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValue name
Scope s(scope);
ScopedValue protectThis(s, this);
ScopedString n(s, name);
- init(n, false);
+ init(n.getPointer(), false);
}
FunctionObject::FunctionObject(InternalClass *ic)
@@ -123,7 +123,7 @@ FunctionObject::~FunctionObject()
function()->compilationUnit->deref();
}
-void FunctionObject::init(const StringRef n, bool createProto)
+void FunctionObject::init(String *n, bool createProto)
{
Scope s(internalClass()->engine);
ScopedValue protectThis(s, this);
@@ -139,7 +139,7 @@ void FunctionObject::init(const StringRef n, bool createProto)
memberData()[Index_Prototype] = Encode::undefined();
}
- ScopedValue v(s, n.asReturnedValue());
+ ScopedValue v(s, n);
defineReadonlyProperty(scope()->d()->engine->id_name, v);
}
@@ -555,7 +555,7 @@ InternalClass *SimpleScriptFunction::internalClassForConstructor()
DEFINE_OBJECT_VTABLE(BuiltinFunction);
-BuiltinFunction::BuiltinFunction(ExecutionContext *scope, const StringRef name, ReturnedValue (*code)(CallContext *))
+BuiltinFunction::BuiltinFunction(ExecutionContext *scope, String *name, ReturnedValue (*code)(CallContext *))
: FunctionObject(scope, name)
{
d()->code = code;