diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-27 08:56:03 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-17 11:01:10 +0100 |
commit | 9d2a5ea28adf8ab35212ca8a71b479bc50960e3d (patch) | |
tree | c59e0799ccf55f832f1e2bde02e256ef62ac2d19 /src/qml/jsruntime/qv4context.cpp | |
parent | a58893eeda6bd48f41bdfa19eda147343be5f81e (diff) |
Return a Heap::Object in Object::prototype()
Change-Id: Ice0265ae558ba14497421a5bbf25ee9db76adab5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 8b510fd1fc..5b993ab2f8 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -142,7 +142,7 @@ Heap::WithContext::WithContext(ExecutionEngine *engine, QV4::Object *with) lookups = parent->lookups; compilationUnit = parent->compilationUnit; - withObject = with->d(); + withObject = with ? with->d() : 0; } Heap::CatchContext::CatchContext(ExecutionEngine *engine, QV4::String *exceptionVarName, const ValueRef exceptionValue) @@ -269,7 +269,8 @@ void ExecutionContext::markObjects(Heap::Base *m, ExecutionEngine *engine) c->function->mark(engine); } else if (ctx->type == Heap::ExecutionContext::Type_WithContext) { WithContext::Data *w = static_cast<WithContext::Data *>(ctx); - w->withObject->mark(engine); + if (w->withObject) + w->withObject->mark(engine); } else if (ctx->type == Heap::ExecutionContext::Type_CatchContext) { CatchContext::Data *c = static_cast<CatchContext::Data *>(ctx); c->exceptionVarName->mark(engine); |