Closed Bug 645121 Opened 9 years ago Closed 9 years ago
Buffer::finish Atom to create an atom from a string buffer
If you're consing up a string which will be atomized immediately after creation, why not just create an atom from the start? The new JSON parser (bug 589664) will need this, but right now all string buffer users just want a string, so it's not used for the moment. I added a JSAPI test to exercise it in the meantime (and afterward, since it's kind of a unit-testy thing).
Attachment #521896 - Flags: review?(igor)
Target Milestone: --- → mozilla2.2
FWIW, this is almost the same as TokenStream::atomize(), except it doesn't check for the empty atom.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.