Closed Bug 1803495 Opened 3 years ago Closed 3 years ago

Support initializing SourceText from AutoStableStringChar

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

There are many uses of SourceText that indirectly come from AutoStableStringChar. Add an overload to remove boilerplate and be more consistent about optimizing buffer transfers.

These two are commonly used together in eval and testing functions so add an
overload and simplify the callers. This also allows transfering buffers in more
cases to avoid additional string copies. Currently only support the char16_t
overload, but in future should also support Utf8Unit overloads.

Remove duplicate code and transfer string buffer ownership in more cases.

Depends on D163552

Blocks: 1798958
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ed79697e312 Support initializing SourceText from AutoStableStringChars. r=arai https://hg.mozilla.org/integration/autoland/rev/f9b2f4359d23 Use AutoStableStringChars overload for SourceText::init. r=arai
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: