diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-09 23:24:39 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-09 23:24:39 (GMT) |
commit | 65b1a5c2cb6c3ebb4ca95119eab9b2ec392333e8 (patch) | |
tree | 125a0967c6bc2a1845e4b3bb2c0dc99098e8a5d4 /src/script/api | |
parent | a1fcebed2b17b688c656f6a7326f7cc5516f4327 (diff) | |
parent | e8abc416f07f74dd12e75b61be0aeac297b7a1f8 (diff) | |
download | Qt-65b1a5c2cb6c3ebb4ca95119eab9b2ec392333e8.zip Qt-65b1a5c2cb6c3ebb4ca95119eab9b2ec392333e8.tar.gz Qt-65b1a5c2cb6c3ebb4ca95119eab9b2ec392333e8.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging:
QScriptEngine: fix property flags for native functions
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index e3291e0..76d9ab2 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -2087,10 +2087,10 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionSignature fun, JSC::ExecState* exec = d->currentFrame; JSC::JSValue function = new (exec)QScript::FunctionWrapper(exec, length, JSC::Identifier(exec, ""), fun); QScriptValue result = d->scriptValueFromJSCValue(function); - result.setProperty(QLatin1String("prototype"), prototype, QScriptValue::Undeletable); + result.setProperty(QLatin1String("prototype"), prototype, + QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); const_cast<QScriptValue&>(prototype) - .setProperty(QLatin1String("constructor"), result, - QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); + .setProperty(QLatin1String("constructor"), result, QScriptValue::SkipInEnumeration); return result; } @@ -2356,9 +2356,9 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionSignature fun, in JSC::JSValue function = new (exec)QScript::FunctionWrapper(exec, length, JSC::Identifier(exec, ""), fun); QScriptValue result = d->scriptValueFromJSCValue(function); QScriptValue proto = newObject(); - result.setProperty(QLatin1String("prototype"), proto, QScriptValue::Undeletable); - proto.setProperty(QLatin1String("constructor"), result, - QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); + result.setProperty(QLatin1String("prototype"), proto, + QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); + proto.setProperty(QLatin1String("constructor"), result, QScriptValue::SkipInEnumeration); return result; } @@ -2374,9 +2374,9 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionWithArgSignature JSC::JSValue function = new (exec)QScript::FunctionWithArgWrapper(exec, /*length=*/0, JSC::Identifier(exec, ""), fun, arg); QScriptValue result = d->scriptValueFromJSCValue(function); QScriptValue proto = newObject(); - result.setProperty(QLatin1String("prototype"), proto, QScriptValue::Undeletable); - proto.setProperty(QLatin1String("constructor"), result, - QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); + result.setProperty(QLatin1String("prototype"), proto, + QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); + proto.setProperty(QLatin1String("constructor"), result, QScriptValue::SkipInEnumeration); return result; } |