diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-17 06:18:30 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-17 06:18:30 (GMT) |
commit | 85e625accb7f55b51e19016313bb204f6f0f835c (patch) | |
tree | b60a7fd15f68d49c530bfa3ca326bdcfe070a9c3 /src/script/bridge/qscriptglobalobject.cpp | |
parent | 53fd1e2fd9c75d7d55606d4ac5df75eda96b9cc9 (diff) | |
parent | 67d8b96d11b560367f068c2466664898a6fb5aed (diff) | |
download | Qt-85e625accb7f55b51e19016313bb204f6f0f835c.zip Qt-85e625accb7f55b51e19016313bb204f6f0f835c.tar.gz Qt-85e625accb7f55b51e19016313bb204f6f0f835c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (83 commits)
probably need to update user configurations once in a while too
use dynamicstore instead
Define JS_NO_EXPORT to avoid JSC C API functions being exported
Don't use QScriptValueIterator to iterate over an array
QtScript: Fix regression when calling newQObject() from native constructor
Added note to OS X installation instructions.
Keypress events ignored in listview on Cocoa (64 Bit) with Japanese IME
Update only appropriate rectangles during update_sys().
Marked QTDS obsolete from Qt 4.7.
QNetworkReply: Fix canReadLine()
Abort waiting replies on session error.
different approach to fixing "the other" aliasing issue
fix aliasing issue in node_construct()
detach in fewer cases, remove redundant calculation
SSL: Fix memleak related to local certificate
Improve keyboard layout detection on X11
Compile on ARM with -Werror -Wold-style-cast
Use the vista-style native dialog for QFileDialog::getExistingDirectory
Apply the stdset attribute for resource properties
doc: Completed sentence about HideNameFilterDetails
...
Diffstat (limited to 'src/script/bridge/qscriptglobalobject.cpp')
-rw-r--r-- | src/script/bridge/qscriptglobalobject.cpp | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/src/script/bridge/qscriptglobalobject.cpp b/src/script/bridge/qscriptglobalobject.cpp index e7ea0df..4c002b7 100644 --- a/src/script/bridge/qscriptglobalobject.cpp +++ b/src/script/bridge/qscriptglobalobject.cpp @@ -72,6 +72,23 @@ bool GlobalObject::getOwnPropertySlot(JSC::ExecState* exec, return JSC::JSGlobalObject::getOwnPropertySlot(exec, propertyName, slot); } +bool GlobalObject::getOwnPropertyDescriptor(JSC::ExecState* exec, + const JSC::Identifier& propertyName, + JSC::PropertyDescriptor& descriptor) +{ + // Must match the logic of getOwnPropertySlot(). + QScriptEnginePrivate *engine = scriptEngineFromExec(exec); + if (propertyName == exec->propertyNames().arguments && engine->currentFrame->argumentCount() > 0) { + // ### Can we get rid of this special handling of the arguments property? + JSC::JSValue args = engine->scriptValueToJSCValue(engine->contextForFrame(engine->currentFrame)->argumentsObject()); + descriptor.setValue(args); + return true; + } + if (customGlobalObject) + return customGlobalObject->getOwnPropertyDescriptor(exec, propertyName, descriptor); + return JSC::JSGlobalObject::getOwnPropertyDescriptor(exec, propertyName, descriptor); +} + void GlobalObject::put(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue value, JSC::PutPropertySlot& slot) { @@ -90,29 +107,20 @@ void GlobalObject::putWithAttributes(JSC::ExecState* exec, const JSC::Identifier JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes); } -bool GlobalObject::deleteProperty(JSC::ExecState* exec, - const JSC::Identifier& propertyName, bool checkDontDelete) -{ - if (customGlobalObject) - return customGlobalObject->deleteProperty(exec, propertyName, checkDontDelete); - return JSC::JSGlobalObject::deleteProperty(exec, propertyName, checkDontDelete); -} - -bool GlobalObject::getPropertyAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName, - unsigned& attributes) const +bool GlobalObject::deleteProperty(JSC::ExecState* exec, const JSC::Identifier& propertyName) { if (customGlobalObject) - return customGlobalObject->getPropertyAttributes(exec, propertyName, attributes); - return JSC::JSGlobalObject::getPropertyAttributes(exec, propertyName, attributes); + return customGlobalObject->deleteProperty(exec, propertyName); + return JSC::JSGlobalObject::deleteProperty(exec, propertyName); } void GlobalObject::getOwnPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames, - bool includeNonEnumerable) + JSC::EnumerationMode mode) { if (customGlobalObject) - customGlobalObject->getOwnPropertyNames(exec, propertyNames, includeNonEnumerable); + customGlobalObject->getOwnPropertyNames(exec, propertyNames, mode); else - JSC::JSGlobalObject::getOwnPropertyNames(exec, propertyNames, includeNonEnumerable); + JSC::JSGlobalObject::getOwnPropertyNames(exec, propertyNames, mode); } void GlobalObject::defineGetter(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction, unsigned attributes) |