diff options
| author | Lars Knoll <lars.knoll@qt.io> | 2017-08-30 22:21:40 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2017-09-01 12:30:57 +0000 |
| commit | 424965fa4572da34c2a4010374e13c41d65576c5 (patch) | |
| tree | f9cf030de6ca227430dd7a411e4786103aaf00db | |
| parent | 44a68a5b9dc551e2af019e5df005e31cdf709023 (diff) | |
Move the stack limit check into VME::exec
Change-Id: Iac870dbb1b2cbf26501694319ebcc168ec9b1df1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| -rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 5 | ||||
| -rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 1 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 401c267898..642fd69aa6 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -355,8 +355,6 @@ DEFINE_OBJECT_VTABLE(ScriptFunction); ReturnedValue ScriptFunction::construct(const Managed *that, CallData *callData) { ExecutionEngine *v4 = that->engine(); - CHECK_STACK_LIMITS(v4); - const ScriptFunction *f = static_cast<const ScriptFunction *>(that); InternalClass *ic = f->classForConstructor(); @@ -377,9 +375,6 @@ ReturnedValue ScriptFunction::construct(const Managed *that, CallData *callData) ReturnedValue ScriptFunction::call(const Managed *that, CallData *callData) { - ExecutionEngine *v4 = that->engine(); - CHECK_STACK_LIMITS(v4); - const ScriptFunction *f = static_cast<const ScriptFunction *>(that); QV4::Function *v4Function = f->function(); Q_ASSERT(v4Function); diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 3f5d187770..e4d29436c0 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -496,6 +496,7 @@ QV4::ReturnedValue VME::exec(CallData *callData, QV4::Function *function) MOTH_JUMP_TABLE; ExecutionEngine *engine = function->internalClass->engine; + CHECK_STACK_LIMITS(engine); Profiling::FunctionCallProfiler(engine, function); Value *jsStackTop = engine->jsStackTop; |
