Closed Bug 1543819 Opened 7 years ago Closed 6 years ago

Provide API for off-thread UTF-8 compilation

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1552979
Tracking Status
firefox68 --- affected

People

(Reporter: Waldo, Assigned: Waldo)

References

(Blocks 1 open bug)

Details

The off-thread compilation APIs:

extern JS_PUBLIC_API bool CanCompileOffThread(
    JSContext* cx, const ReadOnlyCompileOptions& options, size_t length);

extern JS_PUBLIC_API bool CompileOffThread(
    JSContext* cx, const ReadOnlyCompileOptions& options,
    SourceText<char16_t>& srcBuf, OffThreadCompileCallback callback,
    void* callbackData);

extern JS_PUBLIC_API bool CompileOffThreadModule(
    JSContext* cx, const ReadOnlyCompileOptions& options,
    SourceText<char16_t>& srcBuf, OffThreadCompileCallback callback,
    void* callbackData);

all only handle UTF-16 right now. We're going to need UTF-8 versions of them -- possibly ones that just inflate to UTF-16 to start, then ones that affirmatively do not inflate -- to support direct UTF-8 compilation in those places that don't just do it synchronously.

dom/script/ScriptLoader.cpp which handles non-worker script web script compilation, only acts off-thread, so this is a necessary prerequisite to UTF-8 compilation of normal web scripts.

There's some chance this has some intertwining with bug 1543802 as well, but I'm not sure about that yet.

Priority: P1 → P3
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.