diff options
Diffstat (limited to 'WebCore/bindings/js/JSHTMLCollectionCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSHTMLCollectionCustom.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp index b0cfd99..6b2f350 100644 --- a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp +++ b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp @@ -20,7 +20,6 @@ #include "config.h" #include "JSHTMLCollection.h" -#include "AtomicString.h" #include "HTMLCollection.h" #include "HTMLOptionsCollection.h" #include "HTMLAllCollection.h" @@ -32,6 +31,7 @@ #include "Node.h" #include "StaticNodeList.h" #include <wtf/Vector.h> +#include <wtf/text/AtomicString.h> using namespace JSC; @@ -70,7 +70,7 @@ static EncodedJSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec) // Support for document.all(<index>) etc. bool ok; UString string = exec->argument(0).toString(exec); - unsigned index = string.toUInt32(&ok, false); + unsigned index = Identifier::toUInt32(string, ok); if (ok) return JSValue::encode(toJS(exec, jsCollection->globalObject(), collection->item(index))); @@ -81,7 +81,7 @@ static EncodedJSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec) // The second arg, if set, is the index of the item we want bool ok; UString string = exec->argument(0).toString(exec); - unsigned index = exec->argument(1).toString(exec).toUInt32(&ok, false); + unsigned index = Identifier::toUInt32(exec->argument(1).toString(exec), ok); if (ok) { String pstr = ustringToString(string); Node* node = collection->namedItem(pstr); @@ -118,7 +118,7 @@ JSValue JSHTMLCollection::nameGetter(ExecState* exec, JSValue slotBase, const Id JSValue JSHTMLCollection::item(ExecState* exec) { bool ok; - uint32_t index = exec->argument(0).toString(exec).toUInt32(&ok, false); + uint32_t index = Identifier::toUInt32(exec->argument(0).toString(exec), ok); if (ok) return toJS(exec, globalObject(), impl()->item(index)); return getNamedItems(exec, this, Identifier(exec, exec->argument(0).toString(exec))); |