diff options
| author | Leon Clarke <leonclarke@google.com> | 2010-06-03 14:33:32 +0100 |
|---|---|---|
| committer | Leon Clarke <leonclarke@google.com> | 2010-06-08 12:24:51 +0100 |
| commit | 5af96e2c7b73ebc627c6894727826a7576d31758 (patch) | |
| tree | f9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp | |
| parent | 8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff) | |
| download | external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2 | |
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp')
| -rw-r--r-- | WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp b/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp index 86d6fa2..3d819ef 100644 --- a/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp +++ b/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp @@ -58,21 +58,21 @@ static JSValue getNamedItems(ExecState* exec, JSHTMLAllCollection* collection, c // HTMLCollections are strange objects, they support both get and call, // so that document.forms.item(0) and document.forms(0) both work. -static JSValue JSC_HOST_CALL callHTMLAllCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args) +static JSValue JSC_HOST_CALL callHTMLAllCollection(ExecState* exec) { - if (args.size() < 1) + if (exec->argumentCount() < 1) return jsUndefined(); // Do not use thisObj here. It can be the JSHTMLDocument, in the document.forms(i) case. - JSHTMLAllCollection* jsCollection = static_cast<JSHTMLAllCollection*>(function); + JSHTMLAllCollection* jsCollection = static_cast<JSHTMLAllCollection*>(exec->callee()); HTMLAllCollection* collection = static_cast<HTMLAllCollection*>(jsCollection->impl()); // Also, do we need the TypeError test here ? - if (args.size() == 1) { + if (exec->argumentCount() == 1) { // Support for document.all(<index>) etc. bool ok; - UString string = args.at(0).toString(exec); + UString string = exec->argument(0).toString(exec); unsigned index = string.toUInt32(&ok, false); if (ok) return toJS(exec, jsCollection->globalObject(), collection->item(index)); @@ -83,8 +83,8 @@ static JSValue JSC_HOST_CALL callHTMLAllCollection(ExecState* exec, JSObject* fu // The second arg, if set, is the index of the item we want bool ok; - UString string = args.at(0).toString(exec); - unsigned index = args.at(1).toString(exec).toUInt32(&ok, false); + UString string = exec->argument(0).toString(exec); + unsigned index = exec->argument(1).toString(exec).toUInt32(&ok, false); if (ok) { String pstr = ustringToString(string); Node* node = collection->namedItem(pstr); @@ -118,18 +118,18 @@ JSValue JSHTMLAllCollection::nameGetter(ExecState* exec, JSValue slotBase, const return getNamedItems(exec, thisObj, propertyName); } -JSValue JSHTMLAllCollection::item(ExecState* exec, const ArgList& args) +JSValue JSHTMLAllCollection::item(ExecState* exec) { bool ok; - uint32_t index = args.at(0).toString(exec).toUInt32(&ok, false); + uint32_t index = exec->argument(0).toString(exec).toUInt32(&ok, false); if (ok) return toJS(exec, globalObject(), impl()->item(index)); - return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); + return getNamedItems(exec, this, Identifier(exec, exec->argument(0).toString(exec))); } -JSValue JSHTMLAllCollection::namedItem(ExecState* exec, const ArgList& args) +JSValue JSHTMLAllCollection::namedItem(ExecState* exec) { - return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); + return getNamedItems(exec, this, Identifier(exec, exec->argument(0).toString(exec))); } } // namespace WebCore |
