Last Comment Bug 662930 - Consolidate IDB structured clone [de]serialization
: Consolidate IDB structured clone [de]serialization
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla7
Assigned To: Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-08 14:28 PDT by Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
Modified: 2011-06-08 20:56 PDT (History)
2 users (show)
khuey: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (9.61 KB, patch)
2011-06-08 14:28 PDT, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
no flags Details | Diff | Splinter Review
Patch (9.29 KB, patch)
2011-06-08 14:45 PDT, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
bent.mozilla: review+
Details | Diff | Splinter Review

Description Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-06-08 14:28:02 PDT
Created attachment 538117 [details] [diff] [review]
Patch

This will make it easier to add custom serialization/deserialization hooks for fun types.

I removed AsyncConnectionHelper::ConvertCloneBufferToJSVal because
1) the safe if buffer.data() is null behavior seems like something everything should get
2) all of its callers clear the buffer manually after the call anyways.

This passes all IDB tests locally
Comment 1 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-06-08 14:45:24 PDT
Created attachment 538121 [details] [diff] [review]
Patch

bent points out that assuming a context could be dangerous.  This diff requires a context to be passed in explicitly.
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-06-08 14:50:43 PDT
Comment on attachment 538121 [details] [diff] [review]
Patch

Review of attachment 538121 [details] [diff] [review]:
-----------------------------------------------------------------

r=me if you move the JSContext* arg to be first, and we use NS_ASSERTION in idb code.
Comment 3 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-06-08 20:56:06 PDT
http://hg.mozilla.org/mozilla-central/rev/79dcf187987c

Note You need to log in before you can comment on or make changes to this bug.