diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-09 08:50:10 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-09 08:50:10 (GMT) |
commit | eb40a2f0757cc236576a4adba394761409adc501 (patch) | |
tree | 7f04c9a4223bf6fbecaef4b7760c39c4d629f67d /src/3rdparty/webkit/JavaScriptCore/runtime | |
parent | 103439f4c8a70740d6475af1b1b58deede12d2c3 (diff) | |
download | Qt-eb40a2f0757cc236576a4adba394761409adc501.zip Qt-eb40a2f0757cc236576a4adba394761409adc501.tar.gz Qt-eb40a2f0757cc236576a4adba394761409adc501.tar.bz2 |
implement attributes for arguments.{callee,length}
Should be DontEnum, as per ECMA-262.
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.cpp | 10 | ||||
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.cpp index f867fe8..424d96d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.cpp @@ -271,4 +271,14 @@ bool Arguments::deleteProperty(ExecState* exec, const Identifier& propertyName) return JSObject::deleteProperty(exec, propertyName); } +bool Arguments::getPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const +{ + if ((propertyName == exec->propertyNames().length) + || (propertyName == exec->propertyNames().callee)) { + attributes = DontEnum; + return true; + } + return JSObject::getPropertyAttributes(exec, propertyName, attributes); +} + } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h index 13d8d1c..a3941b6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h @@ -94,6 +94,7 @@ namespace JSC { virtual void put(ExecState*, unsigned propertyName, JSValue, PutPropertySlot&); virtual bool deleteProperty(ExecState*, const Identifier& propertyName); virtual bool deleteProperty(ExecState*, unsigned propertyName); + virtual bool getPropertyAttributes(ExecState*, const Identifier& propertyName, unsigned& attributes) const; virtual const ClassInfo* classInfo() const { return &info; } |