Closed Bug 1785942 Opened 2 years ago Closed 2 years ago

Construct JSStrings with constructors

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(3 files)

Right now, we allocate some memory of the right size, cast it to a JSString subclass, and call some form of init() on it. C++ would be happier with us if we went through an actual constructor.

Assignee: nobody → sphink
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P2
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/908782294278 Move more allocation code into the friend-able js::gc::CellAllocator class (was struct) r=arai https://hg.mozilla.org/integration/autoland/rev/ba0222b20638 Expose function that avoids some excess NUL termination r=arai https://hg.mozilla.org/integration/autoland/rev/a2664bf7445f Use constructors for JSString subclasses. r=arai
Blocks: 1787579
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: