[webkit-reviews] review granted: [Bug 128035] IDB: Index cursors use wrong deserialization for the retrieved value : [Attachment 222871] Patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 31 20:55:57 PST 2014


mitz at webkit.org <mitz at webkit.org> has granted Brady Eidson
<beidson at apple.com>'s request for review:
Bug 128035: IDB: Index cursors use wrong deserialization for the retrieved
value
https://bugs.webkit.org/show_bug.cgi?id=128035

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

------- Additional Comments from mitz at webkit.org <mitz at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=222871&action=review


> Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp:106
> +    m_currentValueBuffer = 0;
> +    m_currentValueKey = 0;

nullptr, not 0

> Source/WebCore/Modules/indexeddb/IDBCursorBackend.h:63
> +    SharedBuffer* valueBuffer() const { return (m_cursorType ==
IndexedDB::CursorType::KeyOnly) ? 0 : m_currentValueBuffer.get(); }
> +    IDBKey* valueKey() const { return (m_cursorType ==
IndexedDB::CursorType::KeyOnly) ? 0 : m_currentValueKey.get(); }

Ditto

> Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:267
> +	   String result = "<array> - { ";
> +	   for (size_t i = 0; i < arrayValue.size(); ++i) {
> +	       result.append(arrayValue[i].loggingString());
> +	       if (i < arrayValue.size() - 1)
> +		   result.append(", ");
> +	   }
> +	   result.append(" }");
> +	   return result;

There’s probably a more efficient way to do this using StringBuilder, but this
is good enough for debug-only logging.


More information about the webkit-reviews mailing list