Open Bug 958669 Opened 11 years ago Updated 1 year ago

Want literal String

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: neil, Unassigned)

References

(Blocks 1 open bug)

Details

For some time XPCStringConvert has been able to pass string buffer references into JavaScript which then releases them when the String object gets garbage collected. In bug 514173 I added support for string constants based on jcranmer's code that subverts the JSExternalString type by passing a finaliser that does nothing, but bz thinks that there should be a better way of doing this (if there isn't already, it should be created).
Talked about this with some folks on #jsapi yesterday, actually. There was a proposal to create a JS_NewStaticString which basically promises to do nothing with the buffer. We could implement it internally in jseng using the same custom finalizer bit for now, and then create a better impl under the hood as we work no nursery-allocating strings...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
Blocks: sm-runtime
Severity: S3 → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.