Closed Bug 1445936 Opened 6 years ago Closed 6 years ago

Add a version of JS_NewUCString() that doesn't check for Latin1

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

Details

Attachments

(1 file)

When a context where XPConnect might use JS_NewLatin1String() introduced in bug 1436065, i.e. when converting UTF-8 strings, XPConnect already knows whether the string is Latin1. If it's not, the check performed by JS_NewUCString() is redundant.
Comment on attachment 8959117 [details]
Bug 1445936 - Add JS_NewUCStringDontDeflate() that does not check for Latin1.

https://reviewboard.mozilla.org/r/227996/#review233876

LGTM, thanks.

(I'm not a fan of "UCString" but that's pre-existing and we should be consistent.)
Attachment #8959117 - Flags: review?(jdemooij) → review+
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c50381f10770
Add JS_NewUCStringDontDeflate() that does not check for Latin1. r=jandem
https://hg.mozilla.org/mozilla-central/rev/c50381f10770
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: