From eb40a2f0757cc236576a4adba394761409adc501 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 9 Jul 2009 10:50:10 +0200 Subject: implement attributes for arguments.{callee,length} Should be DontEnum, as per ECMA-262. --- src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.cpp | 10 ++++++++++ src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h | 1 + 2 files changed, 11 insertions(+) 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; } -- cgit v0.12