Closed
Bug 645121
Opened 14 years ago
Closed 14 years ago
Add StringBuffer::finishAtom to create an atom from a string buffer
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
2.81 KB,
patch
|
igor
:
review+
|
Details | Diff | Splinter Review |
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)
Updated•14 years ago
|
Attachment #521896 -
Flags: review?(igor) → review+
Assignee | ||
Comment 1•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/9c065e8e72f6
Whiteboard: fixed-in-tracemonkey
Target Milestone: --- → mozilla2.2
![]() |
||
Comment 2•14 years ago
|
||
FWIW, this is almost the same as TokenStream::atomize(), except it doesn't check for the empty atom.
Comment 3•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9c065e8e72f6
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•