summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/script/api/qscriptengine_p.h16
-rw-r--r--src/script/api/qscriptvalue.cpp16
-rw-r--r--src/script/api/qscriptvalue_p.h4
3 files changed, 18 insertions, 18 deletions
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index a16785ccdd..ec7c144016 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);
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 08a31762b6..52a1e6d4c6 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -438,22 +438,6 @@ void QScriptValuePrivate::setVariantValue(const QVariant &value)
static_cast<QScript::QVariantDelegate*>(delegate)->setValue(value);
}
-void QScriptValuePrivate::saveException(JSC::ExecState *exec, JSC::JSValue *val)
-{
- if (exec) {
- *val = exec->exception();
- exec->clearException();
- } else {
- *val = JSC::JSValue();
- }
-}
-
-void QScriptValuePrivate::restoreException(JSC::ExecState *exec, JSC::JSValue val)
-{
- if (exec && val)
- exec->setException(val);
-}
-
void QScriptValuePrivate::detachFromEngine()
{
if (isJSC())
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 444c76a807..c322a37d2b 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -127,8 +127,8 @@ public:
return -1;
}
- static void saveException(JSC::ExecState*, JSC::JSValue*);
- static void restoreException(JSC::ExecState*, JSC::JSValue);
+ static inline void saveException(JSC::ExecState*, JSC::JSValue*);
+ static inline void restoreException(JSC::ExecState*, JSC::JSValue);
QScriptEnginePrivate *engine;
Type type;