diff options
author | Lars Knoll <[email protected]> | 2015-01-13 21:49:09 +0100 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2015-01-21 13:19:02 +0100 |
commit | 630f118f043edb88501e387d779c62c86b1030d4 (patch) | |
tree | 2c8c3cdcadae94b859760a0603e22748da33453a /src/qml/jsruntime/qv4functionobject.cpp | |
parent | 47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d (diff) |
Move the internalClass pointer into Heap::Object
The other classes that derive from Heap::Base don't need it
at all. So get rid of it there and save a pointer.
Change-Id: I9c5df2e43cd6eeac2e6e41f3d3b8077d3afbc8f2
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 4f55929193..2678186a6a 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -173,7 +173,7 @@ ReturnedValue FunctionObject::newInstance() ReturnedValue FunctionObject::construct(Managed *that, CallData *) { - that->internalClass()->engine->throwTypeError(); + static_cast<FunctionObject *>(that)->internalClass()->engine->throwTypeError(); return Encode::undefined(); } @@ -516,7 +516,7 @@ ReturnedValue SimpleScriptFunction::construct(Managed *that, CallData *callData) ReturnedValue SimpleScriptFunction::call(Managed *that, CallData *callData) { - ExecutionEngine *v4 = that->internalClass()->engine; + ExecutionEngine *v4 = static_cast<SimpleScriptFunction *>(that)->internalClass()->engine; if (v4->hasException) return Encode::undefined(); CHECK_STACK_LIMITS(v4); @@ -570,7 +570,7 @@ Heap::BuiltinFunction::BuiltinFunction(QV4::ExecutionContext *scope, QV4::String ReturnedValue BuiltinFunction::construct(Managed *f, CallData *) { - return f->internalClass()->engine->throwTypeError(); + return static_cast<BuiltinFunction *>(f)->internalClass()->engine->throwTypeError(); } ReturnedValue BuiltinFunction::call(Managed *that, CallData *callData) |