Open Bug 1808301 Opened 1 year ago Updated 11 months ago

Call FormatLocalizedString from a worklet thread

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

People

(Reporter: allstars.chh, Unassigned)

References

Details

In Bug 1806390 worker thread is able to call GetLocalizedString from a worker thread.
We need the same thing for worklets.

Summary: Call GetLocalizedString from a worklet thread → Call FormatLocalizedString from a worklet thread

Hi emilo and smaug:
The patch for Bug 1806390 only fixes worker's case.
For Worklets, they don't have a sync event loop, how do worklets get the localized string off the main thread?

Can you provide some suggestions?

Thanks

Flags: needinfo?(smaug)
Flags: needinfo?(emilio)

I'm not familiar with how worklet event loops work. Seems it should be feasible to either add support to something like MainThreadRunnable, or alternatively making the string bundle stuff really thread-safe?

Flags: needinfo?(emilio)

I'd rather try hard to avoid sync event loop.
In which cases do we need the localized strings? Is it for console.logging only? Could we dispatch a task to the main thread to do the logging?

Flags: needinfo?(smaug)
You need to log in before you can comment on or make changes to this bug.