[webkit-reviews] review granted: [Bug 84174] IndexedDB: implement cursor.advance() : [Attachment 138831] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 25 15:43:58 PDT 2012


Ojan Vafai <ojan at chromium.org> has granted Alec Flett
<alecflett at chromium.org>'s request for review:
Bug 84174: IndexedDB: implement cursor.advance()
https://bugs.webkit.org/show_bug.cgi?id=84174

Attachment 138831: Patch
https://bugs.webkit.org/attachment.cgi?id=138831&action=review

------- Additional Comments from Ojan Vafai <ojan at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=138831&action=review


> Source/WebCore/Modules/indexeddb/IDBCursor.cpp:143
> +    if (m_request->resetReadyState(m_transaction.get())) {
> +	   m_request->setCursor(this);
> +	   m_gotValue = false;
> +	   m_backend->advance(count, m_request, ec);
> +    } else
> +	   ec = IDBDatabaseException::NOT_ALLOWED_ERR;

Nit: I'd reverse the order of this if-statement to early return in the
exceptional case. Typical webkit style is to do all the exceptional cases first
with early returns and then the common-case.


More information about the webkit-reviews mailing list