summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-17 09:38:17 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-17 09:38:17 (GMT)
commit525251ecded0a57e6b456cc787094a5703d7ff13 (patch)
tree329e118e56656d4fa3bc8055dab6a8c20ef05333 /src/script
parent6272ef01f0985fa22262733eddd37c3c39de0a1a (diff)
downloadQt-525251ecded0a57e6b456cc787094a5703d7ff13.zip
Qt-525251ecded0a57e6b456cc787094a5703d7ff13.tar.gz
Qt-525251ecded0a57e6b456cc787094a5703d7ff13.tar.bz2
set correct property flags in newFunction()
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;
}