aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-28 19:15:25 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-17 07:40:03 +0000
commita914b186671090f1ec2ac80fa14b4aef19e8d563 (patch)
tree08ddf9049c59cd6c12a4e2c5eeeb86eb3a46d75c /src/qml/jsruntime/qv4engine_p.h
parent668e4b739a92dd9dbec2d4df76fe9197506c25d9 (diff)
Store rootcontext in a GC safe way
Change-Id: If81d638c0ccd2b34df918ae5055e309f4eae031f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 360dac4af8..04a99d844d 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -81,8 +81,6 @@ public:
Value *jsStackTop;
quint32 hasException;
- Heap::GlobalContext *m_rootContext;
- Heap::GlobalContext *rootContext() const { return m_rootContext; }
MemoryManager *memoryManager;
ExecutableAllocator *executableAllocator;
@@ -128,6 +126,7 @@ public:
QV8Engine *v8Engine;
enum JSObjects {
+ RootContect,
ObjectProto,
ArrayProto,
StringProto,
@@ -174,6 +173,7 @@ public:
Value *jsObjects;
enum { NTypedArrayTypes = 9 }; // == TypedArray::NValues, avoid header dependency
+ GlobalContext *rootContext() const { return reinterpret_cast<GlobalContext *>(jsObjects + RootContect); }
FunctionObject *objectCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + Object_Ctor); }
FunctionObject *stringCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + String_Ctor); }
FunctionObject *numberCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + Number_Ctor); }