~ubuntu-branches/ubuntu/karmic/webkit/karmic-proposed

« back to all changes in this revision

Viewing changes to WebCore/bridge/runtime_array.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-05-15 18:30:58 UTC
  • mto: (4.4.1 sid) (1.2.2 upstream) (16.1.1 lucid)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20090515183058-35m5or0ufm5tutud
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
{
43
43
}
44
44
 
45
 
JSValuePtr RuntimeArray::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
45
JSValue RuntimeArray::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
46
46
{
47
47
    RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slot.slotBase()));
48
48
    return jsNumber(exec, thisObj->getLength());
49
49
}
50
50
 
51
 
JSValuePtr RuntimeArray::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
51
JSValue RuntimeArray::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
52
52
{
53
53
    RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slot.slotBase()));
54
54
    return thisObj->getConcreteArray()->valueAt(exec, slot.index());
83
83
    return JSObject::getOwnPropertySlot(exec, index, slot);
84
84
}
85
85
 
86
 
void RuntimeArray::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
 
86
void RuntimeArray::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
87
87
{
88
88
    if (propertyName == exec->propertyNames().length) {
89
89
        throwError(exec, RangeError);
100
100
    JSObject::put(exec, propertyName, value, slot);
101
101
}
102
102
 
103
 
void RuntimeArray::put(ExecState* exec, unsigned index, JSValuePtr value)
 
103
void RuntimeArray::put(ExecState* exec, unsigned index, JSValue value)
104
104
{
105
105
    if (index >= getLength()) {
106
106
        throwError(exec, RangeError);