Eden Chuang 6dbb975108 Bug 1968427 - Adding a null checking on WorkerPrivate::GlobalScope() in ServiceWorkerOpRunnable. a=diannaS
WorkerPrivate's GlobalScope is created during CompileScriptRunnable::WorkerRun.
However, the creation could fail when there is an OOM issue during the WebIDL bindings.
Although the Worker will start the shutdown as soon as possible, there is still a chance that some WorkerRunnable had already been dispatched to the Worker. And there is no guarantee that there is a GlobalScope for the WorkerRunnable.
Unfortunately, WorkerRunnable should check the GlobalScope existence by itself, because not every WorkerRunnable needs the GlobalScope to perform its functionality.

This patch only does the null checking for the ServiceWorkerOpRunnable, since ServiceWorkerOpRunnable are supposed to dispatching an event to the corresponding ServiceWorkerGlobalScope.

Original Revision: https://phabricator.services.mozilla.com/D254659

Differential Revision: https://phabricator.services.mozilla.com/D258725
2025-07-25 19:04:42 +00:00
2025-05-10 01:55:32 +00:00

Firefox Browser

Firefox is a fast, reliable and private web browser from the non-profit Mozilla organization.

Contributing

To learn how to contribute to Firefox read the Firefox Contributors' Quick Reference document.

We use bugzilla.mozilla.org as our issue tracker, please file bugs there.

Resources

If you have a question about developing Firefox, and can't find the solution on Firefox Source Docs, you can try asking your question on Matrix at chat.mozilla.org in the Introduction channel.

Description
Preconfigured browser for YouTube's TV interface
Readme 5.5 GiB
Languages
JavaScript 32.6%
C++ 25.1%
HTML 20.9%
C 10.6%
Python 2.8%
Other 7.6%