summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp')
-rw-r--r--WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp24
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