summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptengine.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 5ffb04e..0a3fbf1 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -1415,9 +1415,10 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionSignature fun,
JSC::ExecState* exec = d->currentFrame;
JSC::JSValue function = new (exec)QScript::FunctionWrapper(this, length, JSC::Identifier(exec, ""), fun);
QScriptValue result = d->scriptValueFromJSCValue(function);
- result.setProperty(QLatin1String("prototype"), prototype);
+ result.setProperty(QLatin1String("prototype"), prototype, QScriptValue::Undeletable);
const_cast<QScriptValue&>(prototype)
- .setProperty(QLatin1String("constructor"), result, QScriptValue::SkipInEnumeration);
+ .setProperty(QLatin1String("constructor"), result,
+ QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
return result;
}