Closed
Bug 613083
Opened 14 years ago
Closed 14 years ago
IndexedDB: Switch serialization format from JSON to structured clone bytestream
Categories
(Core :: Storage: IndexedDB, defect)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: bent.mozilla, Assigned: bent.mozilla)
References
Details
Attachments
(1 file)
64.07 KB,
patch
|
sicking
:
review+
jorendorff
:
review+
|
Details | Diff | Splinter Review |
We don't want to have to support JSON forever, let's just move to the structured clone bytestream format.
Assignee | ||
Comment 2•14 years ago
|
||
Note that we need to bake in the structured clone version in every object store or db, somehow. That version number needs to be passed to the structured clone read functions.
blocking2.0: betaN+ → ---
Comment 3•14 years ago
|
||
(In reply to comment #2) > Note that we need to bake in the structured clone version in every object store > or db, somehow. That version number needs to be passed to the structured clone > read functions. Ben, did you mean to removing the blocking flag with this comment?
blocking2.0: ? → betaN+
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #498180 -
Flags: review?(jorendorff)
Attachment #498180 -
Flags: review?(jonas)
Comment on attachment 498180 [details] [diff] [review] Patch, v1 >@@ -408,19 +409,20 @@ IDBCursor::GetValue(JSContext* aCx, >- nsCOMPtr<nsIJSON> json(new nsJSON()); >- rv = json->DecodeToJSVal(mValue, aCx, &mCachedValue); >- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_DATA_CLONE_ERR); >+ if (!mCloneBuffer.read(&mCachedValue, aCx)) { >+ mCachedValue = JSVAL_VOID; >+ return NS_ERROR_DOM_DATA_CLONE_ERR; >+ } Should you free the buffer-data after this to free up the memory as soon as possible. The buffer is never used again, right? r=me
Attachment #498180 -
Flags: review?(jonas) → review+
Comment 7•14 years ago
|
||
I'm a fan of fixing this bug -- but I'm on vacation until the new year.
Assignee | ||
Comment 8•14 years ago
|
||
(In reply to comment #7) > I'm a fan of fixing this bug -- but I'm on vacation until the new year. Ok, thanks. I think I'll land it now since the changes to indexedDB are huge and the changes to jsapi are small (I only tweaked the JSAutoStructuredCloneBuffer class to accept more than one context). I'd still like your review, and we can file a followup if you want any changes.
Assignee | ||
Comment 9•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1b1561128c5d
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 10•14 years ago
|
||
Comment on attachment 498180 [details] [diff] [review] Patch, v1 Mmm. r=me, but this API keeps getting uglier. Something's wrong. It would be nice to try and figure out what that is at some point.
Attachment #498180 -
Flags: review?(jorendorff) → review+
Component: DOM → DOM: IndexedDB
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•