diff options
Diffstat (limited to 'src/script/api/qscriptengine_p.h')
-rw-r--r-- | src/script/api/qscriptengine_p.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index a16785c..ec7c144 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -527,6 +527,22 @@ inline void QScriptValuePrivate::operator delete(void *ptr) qFree(d); } +inline void QScriptValuePrivate::saveException(JSC::ExecState *exec, JSC::JSValue *val) +{ + if (exec) { + *val = exec->exception(); + exec->clearException(); + } else { + *val = JSC::JSValue(); + } +} + +inline void QScriptValuePrivate::restoreException(JSC::ExecState *exec, JSC::JSValue val) +{ + if (exec && val) + exec->setException(val); +} + inline void QScriptEnginePrivate::registerScriptString(QScriptStringPrivate *value) { Q_ASSERT(value->type == QScriptStringPrivate::HeapAllocated); |