diff options
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index e3a99e9ddb..64d6583f60 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -611,6 +611,11 @@ ExecutionEngine::~ExecutionEngine() delete [] argumentsAccessors; } +ExecutionContext *ExecutionEngine::currentContext() const +{ + return static_cast<ExecutionContext *>(¤tStackFrame->jsFrame->context); +} + #if QT_CONFIG(qml_debug) void ExecutionEngine::setDebugger(Debugging::Debugger *debugger) { diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index abd363adcb..a1bd321412 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -477,10 +477,7 @@ public: void setProfiler(Profiling::Profiler *profiler); #endif // QT_CONFIG(qml_debug) - void setCurrentContext(Heap::ExecutionContext *context); - ExecutionContext *currentContext() const { - return static_cast<ExecutionContext *>(¤tStackFrame->jsFrame->context); - } + ExecutionContext *currentContext() const; // ensure we always get odd prototype IDs. This helps make marking in QV4::Lookup fast quintptr newProtoId() { return (protoIdCount += 2); } @@ -613,11 +610,6 @@ struct NoThrowEngine; #endif -inline void ExecutionEngine::setCurrentContext(Heap::ExecutionContext *context) -{ - currentStackFrame->jsFrame->context = context; -} - #define CHECK_STACK_LIMITS(v4) if ((v4)->checkStackLimits()) return Encode::undefined(); \ ExecutionEngineCallDepthRecorder _executionEngineCallDepthRecorder(v4); |