Closed Bug 1804842 Opened 2 years ago Closed 2 years ago

Refactor GetDecimal not to directly depend on JSContext

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

TokenStream uses GetDecimal and related functions, and they require JSContext parameter just to allocate Vector<char, 32> chars(cx) with TempAllocPolicy.

those functions needs to be refactored not to use JSContext, but allocator + error reporter separately (or just FrontendContext), so that they can be used from frontend (TokenStream) without JSContext

What if we remove the context parameter completely and let the caller report OOM?

That sounds simpler.
I'll modify the patch.

Attachment #9307552 - Attachment description: WIP: Bug 1804842 - Use FrontendContext in GetDecimal. r?bthrall! → Bug 1804842 - Remove JSContext from GetDecimal. r?bthrall!
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/2606db55b8e5 Remove JSContext from GetDecimal. r=bthrall
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Regressions: 1807228
No longer regressions: 1807228
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: