Implement a JS_Init JSAPI function that must be called before any JSAPI entrypoint is called

RESOLVED DUPLICATE of bug 896124

Status

()

RESOLVED DUPLICATE of bug 896124
5 years ago
5 years ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

13.72 KB, patch
Details | Diff | Splinter Review
(Assignee)

Description

5 years ago
ICU provides initialization and cleanup functions that must be called for memory allocations and the like to be tracked correctly.  The latter in particular is relevant for tinderbox tracking of allocations and leaks -- if we don't cleanup ICU, we effectively leak whatever it's allocated under the hook, that wasn't allocated because it was needed for some particular ICU object we allocated and properly deallocated.

We already have JS_ShutDown for the cleanup hook, and somewhat surprisingly it seems to be called in the places that matter already.  All that's needed is an identical init function.

I'll add the ICU init/cleanup function calls in a separate bug; this is just to carve out the JSAPI space for it, and to clear out JS_NewRuntime of a whole bunch of init codee that really belongs in JS_Init.
(Assignee)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 896124
You need to log in before you can comment on or make changes to this bug.