Closed Bug 1694054 Opened 3 years ago Closed 2 years ago

Add CompilationStencil::unshare

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

CompilationStencil decoded from XDR buffer has pointer to the XDR buffer,
and if the XDR buffer has shorter lifetime than CompilationStencil,
CompilationStencil needs to copy all data out of XDR buffer.

To be clear, currently there's no consumer of unshare in the patch stack.
it's possibly for ScriptPreloader/StartupCache usage, or later phase

maybe it's better adding public API and also jsapi-test

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Attachment #9204473 - Attachment description: Bug 1694054 - Add CompilationStencil::unshare. → Bug 1694054 - Add CompilationStencil::unshare and JS::UnshareStencil. r?tcampbell!
Blocks: 1718481
No longer blocks: 1718481
Attachment #9204473 - Attachment is obsolete: true

for XDR decode case, bug 1731629 will provide CompileOptions.borrowBuffer that allows not borrowing the buffer when decoding,
so that there's no need to unshare on the stencil.

See Also: → 1731629

so far we don't need unshare method.
we have multiple similar methods for different purposes, such as steal, cloneFrom

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: