diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index deda792cc6..9bc6633fec 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1236,8 +1236,8 @@ Moth::StackSlot Codegen::pushArgs(ArgumentList *args) (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::Function); (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::Context); (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::Accumulator); -#endif (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::This); +#endif (void) Reference::fromConst(this, QV4::Encode(argc)).storeOnStack(calldata + CallData::Argc); Q_STATIC_ASSERT(sizeof(CallData) == 6 * sizeof(Value)); diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 57c24e5c12..18eac9a7fb 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -991,7 +991,7 @@ uint Runtime::method_compareIn(ExecutionEngine *engine, const Value &left, const ReturnedValue Runtime::method_callGlobalLookup(ExecutionEngine *engine, uint index, CallData *callData) { - Q_ASSERT(callData->thisObject.isUndefined()); + callData->thisObject = Encode::undefined(); Lookup *l = engine->currentStackFrame->v4Function->compilationUnit->runtimeLookups + index; callData->function = l->globalGetter(l, engine); @@ -1003,7 +1003,7 @@ ReturnedValue Runtime::method_callGlobalLookup(ExecutionEngine *engine, uint ind ReturnedValue Runtime::method_callPossiblyDirectEval(ExecutionEngine *engine, CallData *callData) { - Q_ASSERT(callData->thisObject.isUndefined()); + callData->thisObject = Encode::undefined(); ExecutionContext &ctx = static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context); callData->function = ctx.getPropertyAndBase(engine->id_eval(), &callData->thisObject); if (engine->hasException) @@ -1027,7 +1027,7 @@ ReturnedValue Runtime::method_callPossiblyDirectEval(ExecutionEngine *engine, Ca ReturnedValue Runtime::method_callName(ExecutionEngine *engine, int nameIndex, CallData *callData) { - Q_ASSERT(callData->thisObject.isUndefined()); + callData->thisObject = Encode::undefined(); callData->function = engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]; ExecutionContext &ctx = static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context); @@ -1107,6 +1107,7 @@ ReturnedValue Runtime::method_callElement(ExecutionEngine *engine, const Value & ReturnedValue Runtime::method_callValue(ExecutionEngine *engine, const Value &func, CallData *callData) { + callData->thisObject = Encode::undefined(); callData->function = func; if (!func.isFunctionObject()) return engine->throwTypeError(QStringLiteral("%1 is not a function").arg(func.toQStringNoThrow())); |