diff options
| author | Ben Murdoch <benm@google.com> | 2010-06-15 19:36:43 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-06-16 14:52:28 +0100 |
| commit | 545e470e52f0ac6a3a072bf559c796b42c6066b6 (patch) | |
| tree | c0c14763654d84d37577dde512c3d3b4699a9e86 /WebCore/bindings/js/JSHTMLCollectionCustom.cpp | |
| parent | 719298a66237d38ea5c05f1547123ad8aacbc237 (diff) | |
| download | external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.zip external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.gz external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.bz2 | |
Merge webkit.org at r61121: Initial merge by git.
Change-Id: Icd6db395c62285be384d137164d95d7466c98760
Diffstat (limited to 'WebCore/bindings/js/JSHTMLCollectionCustom.cpp')
| -rw-r--r-- | WebCore/bindings/js/JSHTMLCollectionCustom.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp index 24059b7..b0cfd99 100644 --- a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp +++ b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp @@ -55,10 +55,10 @@ static JSValue getNamedItems(ExecState* exec, JSHTMLCollection* collection, cons // 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 callHTMLCollection(ExecState* exec) +static EncodedJSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec) { if (exec->argumentCount() < 1) - return jsUndefined(); + return JSValue::encode(jsUndefined()); // Do not use thisObj here. It can be the JSHTMLDocument, in the document.forms(i) case. JSHTMLCollection* jsCollection = static_cast<JSHTMLCollection*>(exec->callee()); @@ -72,10 +72,10 @@ static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec) UString string = exec->argument(0).toString(exec); unsigned index = string.toUInt32(&ok, false); if (ok) - return toJS(exec, jsCollection->globalObject(), collection->item(index)); + return JSValue::encode(toJS(exec, jsCollection->globalObject(), collection->item(index))); // Support for document.images('<name>') etc. - return getNamedItems(exec, jsCollection, Identifier(exec, string)); + return JSValue::encode(getNamedItems(exec, jsCollection, Identifier(exec, string))); } // The second arg, if set, is the index of the item we want @@ -87,13 +87,13 @@ static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec) Node* node = collection->namedItem(pstr); while (node) { if (!index) - return toJS(exec, jsCollection->globalObject(), node); + return JSValue::encode(toJS(exec, jsCollection->globalObject(), node)); node = collection->nextNamedItem(pstr); --index; } } - return jsUndefined(); + return JSValue::encode(jsUndefined()); } CallType JSHTMLCollection::getCallData(CallData& callData) |
