Commit 7884603b authored by mjs's avatar mjs

JavaScriptCore:

        Reviewed by Darin.

	- fixed 3056449 - can't select state at tucows.com

        * kjs/array_instance.h:
        * kjs/array_object.cpp:
	(ArrayInstanceImp::propList): Add numeric proprties that are in
	special storage.
        * kjs/array_object.h:
        * kjs/object.h: Make propList a virtual method.

WebCore:

        Reviewed by Darin.

        * force-js-clean-timestamp: Update for JavaScriptCore changes.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2da8a2a4
2002-12-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3056449 - can't select state at tucows.com
* kjs/array_instance.h:
* kjs/array_object.cpp:
(ArrayInstanceImp::propList): Add numeric proprties that are in
special storage.
* kjs/array_object.h:
* kjs/object.h: Make propList a virtual method.
2002-12-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
......
2002-12-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3056449 - can't select state at tucows.com
* kjs/array_instance.h:
* kjs/array_object.cpp:
(ArrayInstanceImp::propList): Add numeric proprties that are in
special storage.
* kjs/array_object.h:
* kjs/object.h: Make propList a virtual method.
2002-12-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
......
......@@ -40,6 +40,7 @@ namespace KJS {
virtual bool hasProperty(ExecState *exec, unsigned propertyName) const;
virtual bool deleteProperty(ExecState *exec, const Identifier &propertyName);
virtual bool deleteProperty(ExecState *exec, unsigned propertyName);
virtual ReferenceList propList(ExecState *exec, bool recursive);
virtual void mark();
......
......@@ -196,6 +196,23 @@ bool ArrayInstanceImp::deleteProperty(ExecState *exec, unsigned index)
return ObjectImp::deleteProperty(exec, Identifier::from(index));
}
ReferenceList ArrayInstanceImp::propList(ExecState *exec, bool recursive)
{
ReferenceList properties = ObjectImp::propList(exec,recursive);
// avoid fetching this every time through the loop
ValueImp *undefined = UndefinedImp::staticUndefined;
for (unsigned i = 0; i < storageLength; ++i) {
ValueImp *imp = storage[i];
if (imp && imp != undefined) {
properties.append(Reference(this, i));
}
}
return properties;
}
void ArrayInstanceImp::resizeStorage(unsigned newLength)
{
if (newLength < storageLength) {
......
......@@ -572,7 +572,7 @@ namespace KJS {
const ScopeChain &scope() const { return _scope; }
void setScope(const ScopeChain &s) { _scope = s; }
ReferenceList propList(ExecState *exec, bool recursive = true);
virtual ReferenceList propList(ExecState *exec, bool recursive = true);
Value internalValue() const;
void setInternalValue(const Value &v);
......
2002-12-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* force-js-clean-timestamp: Update for JavaScriptCore changes.
2002-12-12 Darin Adler <darin@apple.com>
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Maciej.
......
2002-12-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* force-js-clean-timestamp: Update for JavaScriptCore changes.
2002-12-12 Darin Adler <darin@apple.com>
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Maciej.
......
ScopeChain inlining 11/24 - Darin
Made Object::propList virtual - 12/12 Maciej
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment