summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-09 08:50:10 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-09 08:50:10 (GMT)
commiteb40a2f0757cc236576a4adba394761409adc501 (patch)
tree7f04c9a4223bf6fbecaef4b7760c39c4d629f67d /src/3rdparty/webkit/JavaScriptCore/runtime
parent103439f4c8a70740d6475af1b1b58deede12d2c3 (diff)
downloadQt-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.cpp10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h1
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; }