diff options
Diffstat (limited to 'src/qml/jsruntime/qv4scopedvalue_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4scopedvalue_p.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h index 2e76eb453e..17a19b5201 100644 --- a/src/qml/jsruntime/qv4scopedvalue_p.h +++ b/src/qml/jsruntime/qv4scopedvalue_p.h @@ -86,14 +86,20 @@ struct Scope { return ptr; } + bool hasException() const { + return engine->hasException; + } + ExecutionEngine *engine; SafeValue *mark; #ifndef QT_NO_DEBUG mutable int size; #endif + +private: + Q_DISABLE_COPY(Scope) }; -struct ScopedValue; struct ValueRef; struct ScopedValue @@ -735,7 +741,7 @@ inline WeakValue &WeakValue::operator=(Returned<T> *obj) return operator=(QV4::Value::fromManaged(obj->getPointer()).asReturnedValue()); } -inline ReturnedValue SimpleCallContext::argument(int i) { +inline ReturnedValue CallContext::argument(int i) { return i < callData->argc ? callData->args[i].asReturnedValue() : Primitive::undefinedValue().asReturnedValue(); } |