Consolidate IDB structured clone [de]serialization

RESOLVED FIXED in mozilla7

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: khuey, Assigned: khuey)

Tracking

unspecified
mozilla7
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

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
Attachment #538117 - Flags: review?(bent.mozilla)
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.
Attachment #538117 - Attachment is obsolete: true
Attachment #538117 - Flags: review?(bent.mozilla)
Attachment #538121 - Flags: review?(bent.mozilla)
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.
Attachment #538121 - Flags: review?(bent.mozilla) → review+
http://hg.mozilla.org/mozilla-central/rev/79dcf187987c
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
You need to log in before you can comment on or make changes to this bug.