#4244 closed enhancement (fixed)
[PATCH] Remove unneeded ReserveScriptBackref from the StdDeserializer
Reported by: | Itms | Owned by: | Itms |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 22 |
Component: | Core engine | Keywords: | patch |
Cc: | leper | Patch: |
Description
If I'm not mistaken, the ReserveScriptBackref
system in the deserializer is useless. One must pay attention to creating the backref at the right moment (see r16959) but it's not needed to actually assign the backref after the object is populated.
I think this system was actually useful before we had exact stack rooting.
This patch also contains whitespace fixes, and it makes one of the tests more logical.
Attachments (1)
Change History (8)
by , 8 years ago
Attachment: | deserializer-cleanup.patch added |
---|
comment:1 by , 7 years ago
Summary: | [PATCH] Small cleanup of the deserializer → [PATCH] Remove unneeded ReserveScriptBackref from the StdDeserializer |
---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Cc: | added |
---|
I'll take care of committing after taking one more look - also I thought I had put leper in CC (since we worked together on fixing bugs here), I'm doing it now.
comment:4 by , 7 years ago
It might have been useful back when it was introcuded (r13429), but the SpiderMonkey API changed since then, and it doesn't seem useful any more. We might create backrefs to something and then fail to actually construct the object, but in those cases we already throw (and we never attempt to recover from that so no real issue there).
You should also nuke FreeScriptBackrefs
which is useless since r16214.
Didn't test it though.
comment:7 by , 7 years ago
Keywords: | review removed |
---|---|
Milestone: | Work In Progress → Alpha 22 |
Thanks for noticing the FreeScriptBackrefs
function.
Seems to work fine, can be committed imo.