Changeset 18715 in webkit for trunk/JavaScriptCore/kjs/value.h


Ignore:
Timestamp:
Jan 9, 2007, 9:38:46 AM (18 years ago)
Author:
ap
Message:

2007-01-09 Mitz Pettel <[email protected]>

Reviewed by Darin.

JavaScriptCore:

  • JavaScriptCore.exp:
  • kjs/value.cpp: (KJS::JSValue::toInt32): Folded toInt32Inline into this method, which was its only caller. (KJS::JSValue::toUInt32): Added a variant that reports if the conversion has succeeded.
  • kjs/value.h:

WebCore:

  • bindings/js/kjs_html.cpp: (KJS::JSHTMLCollectionProtoFunc::callAsFunction): Changed item() to fall back to namedItem() if its argument does not convert to a number.

LayoutTests:

  • fast/dom/collection-namedItem-via-item-expected.txt: Added.
  • fast/dom/collection-namedItem-via-item.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/value.h

    r17372 r18715  
    9595
    9696    // Integer conversions.
    97     double toInteger(ExecState *exec) const;
     97    double toInteger(ExecState*) const;
    9898    int32_t toInt32(ExecState*) const;
    9999    int32_t toInt32(ExecState*, bool& ok) const;
    100     uint32_t toUInt32(ExecState *exec) const;
    101     uint16_t toUInt16(ExecState *exec) const;
     100    uint32_t toUInt32(ExecState*) const;
     101    uint32_t toUInt32(ExecState*, bool& ok) const;
     102    uint16_t toUInt16(ExecState*) const;
    102103
    103104    // Garbage collection.
     
    109110    JSCell *downcast();
    110111    const JSCell *downcast() const;
    111     inline int32_t toInt32Inline(ExecState*, bool& ok) const;
    112112
    113113    // Give a compile time error if we try to copy one of these.
Note: See TracChangeset for help on using the changeset viewer.