Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
Eden Chuang b68bc791d0 Bug 1892644 - Handling WorkerThreadRunnable::Run() after Worker is "Dead". r=asuth
In bug 1769913, we remove the WorkerThreadRunnable's raw pointer to the corresponding WorkerPrivate and expect the corresponding WorkerPrivate to be obtained by GetCurrentThreadWorkerPrivate() when WorkerThreadRunnable::Run executing.

In general, the assumption is correct. However, it could be violated in the following two situations.

1. WorkerJSContext initialization fails.
2. WorkerThreadRunnable dispatching after CycleCollector shutdown.
In both cases, there is no corresponding WorkerJSContext to get its mWorkerPrivate by GetCurrentThreadWorkerPrivate(), which causes WorkerThreadRunnable to have no WorkerPrivate for executing.

For case 1, the WorkerThreadRunnables are all from WorkerPrivate::mPreStartRunnables. These runnables need a WorkerPrivate to execute WorkerRun(). To cleanup the resources through WorkerRun() if Worker initialization fails or shutdown before DoRunLoop() starts, WorkerThreadRunnable saves a CheckedUnsafePtr<WorkerPrivate> when the runnable is dispacthed to WorkerPrivate::mPreStartRunnables.

For case 2, the solution could be much easier since the WorkerThreadRunnable is not really a WorkerThreadRunnable. Because the Worker is in the "Dead" state, the WorkerThreadRunnable could not be dispatched normally, which means by WorkerThreadRunnable::Dispatch(WorkerPrivate). So it must be from NS_DispatchToCurrentThread(), WorkerThread::Dispatch(), or other ways which treat WorkerThread as nsIThread/nsISerialEventTarget, where the runnable is wrapped as a WorkerThreadRunnable and call nsThread::Dispatch() directly. In this case, the runnable does not need to be WorkerThreadRunnable, so we should be able to call the runnable's Run() directly.

Differential Revision: https://phabricator.services.mozilla.com/D208259
2024-05-02 06:37:51 +00:00
.cargo Bug 1884879 - [css-syntax] Implement recent syntax spec change to avoid parsing custom properties that look like selectors. r=firefox-style-system-reviewers,zrhoffman,supply-chain-reviewers,glandium 2024-04-30 23:49:44 +00:00
.github/workflows
.vscode
accessible Bug 1878356: Remove nbsp trimming from acc names, r=Jamie 2024-04-30 00:35:45 +00:00
browser Bug 1552815: Use setFaviconForPage() to tests that can apply r=mak 2024-05-01 20:40:50 +00:00
build Bug 1893677 - Stop making some automation tiers print their own BUILDSTATUS. r=firefox-build-system-reviewers,ahochheiden 2024-05-01 03:50:06 +00:00
caps Bug 1892481 - More consistently enforce noscript and builtinclass in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,media-playback-reviewers,mccr8,padenot 2024-04-22 18:19:58 +00:00
chrome Bug 1864896: Autofix unused function arguments (general). r=nika,jfkthame,ckerschb 2024-03-19 14:59:22 +00:00
config Bug 1877926 - Make mach build --keep-going pass --keep-going to cargo. r=firefox-build-system-reviewers,nalexander 2024-05-02 04:20:41 +00:00
devtools Bug 1892459 - [devtools] Add textInput in event listener breakpoints panel. r=devtools-reviewers,bomsy. 2024-05-02 04:58:51 +00:00
docs Bug 1893159 - add technical docs for phabricator to fx-source-docs, r=bgrins 2024-04-30 22:58:13 +00:00
docshell Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. r=geckoview-reviewers,farre,nika,owlish 2024-04-30 11:17:55 +00:00
dom Bug 1892644 - Handling WorkerThreadRunnable::Run() after Worker is "Dead". r=asuth 2024-05-02 06:37:51 +00:00
editor Bug 1877513 - Make HTMLEditor deletes only preceding lines of right child block if the range starts from start of a line r=m_kato 2024-04-27 00:36:26 +00:00
extensions Bug 1893434 - Test, r=manuel,anti-tracking-reviewers 2024-04-30 09:30:33 +00:00
gfx Bug 1874199 - Add support for animation properties on StickyFrame spatial nodes. r=gw 2024-05-02 02:49:21 +00:00
gradle/wrapper Bug 1887180 - Update Gradle to version 8.7. r=android-reviewers 2024-03-25 14:35:36 +00:00
hal
image Bug 1805599. Fix handling of invalidations in non-animated vector images that use the webrender imageprovider path. r=aosmond 2024-05-02 01:45:32 +00:00
intl Bug 1868440 - [ci] Upgrade taskcluster-taskgraph to v7.4.0, r=perftest-reviewers,geckoview-reviewers,ci-and-tooling,devtools-reviewers,taskgraph-reviewers,releng-reviewers,mach-reviewers,omc-reviewers,jmaher,hneiva,aminomancer,jari,dom-storage-reviewers,afinder,asuth,bhearsum,owlish 2024-04-18 20:39:09 +00:00
ipc Bug 1893087 - Part 2: Add test for constructing an actor under an already dead manager, r=ipc-reviewers,mccr8 2024-04-30 21:27:34 +00:00
js Backed out 2 changesets (bug 1868423) for causing failures at test_xrayToJS.xhtml. CLOSED TREE 2024-05-02 03:46:38 +03:00
layout Bug 1894363 - Make min size of SVG match nsImageFrame. r=dholbert 2024-05-02 06:34:16 +00:00
media Bug 1894067 - Update opus to 20568812ae92bb148fe3fb0190b7629f1c4d0b96 r=kinetik DONTBUILD 2024-05-01 00:39:33 +00:00
memory Bug 1891918 - Update mozjemalloc's kCacheLineSize for Apple Silicon r=glandium 2024-04-18 05:13:15 +00:00
mfbt Bug 1894147 - Fix C++20 std::memory_order build errors in MPSCQueue.h. r=xpcom-reviewers,emilio 2024-04-30 15:37:35 +00:00
mobile Bug 1892273 - Run Focus Robolectric tests on default targetSdkVersion. r=android-reviewers,boek 2024-05-02 06:14:56 +00:00
modules Backed out 2 changesets (bug 1868423) for causing failures at test_xrayToJS.xhtml. CLOSED TREE 2024-05-02 03:46:38 +03:00
mozglue Bug 1893532 - Improve error message of HTMLInputElement.stepUp/stepDown. r=dom-core,sefeng 2024-05-01 00:11:33 +00:00
netwerk Backed out changeset a8e17efc1b46 (bug 1888227) for causing Xpcshell failures at test_cookies_privatebrowsing.js. 2024-05-02 00:20:22 +03:00
nsprpub
other-licenses Bug 1883629 - Update Snappy to version 1.2.0. r=dom-storage-reviewers,janv 2024-04-08 13:48:06 +00:00
parser Bug 1884208 - Remove negative probes for measuring delta between OnDataFinished and OnStopRequest in HttpChannelChild and HTML5Parser. r=jesup,necko-reviewers 2024-03-28 09:37:25 +00:00
python Bug 1894160: vendor-python: explicitly add the content of the .egg-info directory; r=ahochheiden 2024-05-01 14:54:58 +00:00
remote Bug 1893664 - [puppeteer] Mark Page.authenticate test as FAIL/PASS because use_redirect_for_retries changes value on late beta r=webdriver-reviewers,whimboo 2024-04-30 08:46:09 +00:00
security Bug 1891763 - land NSS NSS_3_100_BETA2 UPGRADE_NSS_RELEASE, r=nss-reviewers,jschanck 2024-05-01 09:24:48 +00:00
services Bug 1552815: Use setFaviconForPage() instead of replaceFaviconDataFromDataURL() r=sync-reviewers,mak 2024-05-01 20:40:50 +00:00
servo Bug 1884879 - [css-syntax] [css-nesting] Implement recent spec change about blocks and custom / non-custom properties. r=firefox-style-system-reviewers,zrhoffman 2024-04-30 23:49:45 +00:00
startupcache Bug 1882581: Implement @scope parsing. r=firefox-style-system-reviewers,saschanaz,emilio 2024-03-19 13:36:48 +00:00
storage Bug 1891141 - Add configuration parameters for pages per step and step delay to mozIStorageAsyncConnection.backupToFileAsync. r=mak 2024-04-17 20:50:47 +00:00
supply-chain Bug 1884879 - [css-syntax] Implement recent syntax spec change to avoid parsing custom properties that look like selectors. r=firefox-style-system-reviewers,zrhoffman,supply-chain-reviewers,glandium 2024-04-30 23:49:44 +00:00
taskcluster Bug 1894130 - Upgrade clang 18 toolchain to 18.1.4. r=firefox-build-system-reviewers,ahochheiden 2024-05-02 04:19:39 +00:00
testing Bug 1894363 - Make min size of SVG match nsImageFrame. r=dholbert 2024-05-02 06:34:16 +00:00
third_party Bug 1884879 - [css-syntax] Implement recent syntax spec change to avoid parsing custom properties that look like selectors. r=firefox-style-system-reviewers,zrhoffman,supply-chain-reviewers,glandium 2024-04-30 23:49:44 +00:00
toolkit Bug 1552815: Remove replaceFaviconData and replaceFaviconDataFromDataURL from nsIFaviconService r=mak 2024-05-01 20:40:51 +00:00
tools Bug 1889978 - Vendor ffmpeg 7.0 headers. r=media-playback-reviewers,frontend-codestyle-reviewers,alwu 2024-04-30 14:21:45 +00:00
uriloader Backed out 2 changesets (bug 1883693) for causing xpc failures @ test_fetch-file.js CLOSED TREE 2024-05-01 04:08:52 +03:00
view Bug 1893357 - Drop |aRepaintExposedAreaOnly| argument from nsViewManager::ResizeView(). r=tnikkel 2024-04-25 02:37:26 +00:00
widget Bug 1892976 - Propagate the error returned by nsIClipboard::GetData() over IPC; r=nika 2024-05-01 20:49:09 +00:00
xpcom Bug 1894549 - Make cpu.cores null instead of 0. r=xpcom-reviewers,mccr8 2024-05-01 21:30:20 +00:00
xpfe/appshell Bug 1893918 - A not-yet-loaded browser window shouldn't stop being an early blank window. r=win-reviewers,rkraesig 2024-04-30 08:39:59 +00:00
.arcconfig
.babel-eslint.rc.js
.clang-format
.clang-format-ignore Bug 1889978 - Vendor ffmpeg 7.0 headers. r=media-playback-reviewers,frontend-codestyle-reviewers,alwu 2024-04-30 14:21:45 +00:00
.cron.yml Bug 1890373 - Enable android-l10n-sync via cron on mozilla-beta r=hneiva,gabriel 2024-04-15 18:07:57 +00:00
.eslintignore Bug 1864255. Move crashtests that leave window(s) open to the very end. r=dholbert,frontend-codestyle-reviewers 2024-04-21 21:37:49 +00:00
.eslintrc-test-paths.js Bug 1876432 - Added support for custom themes as its own menu in Reader View. r=reader-mode-reviewers,fluent-reviewers,desktop-theme-reviewers,hjones,accessibility-frontend-reviewers,bolsson,devtools-reviewers,sfoster,cmkm,jules,ayeddi 2024-04-02 00:08:46 +00:00
.eslintrc.js Bug 1891982 - Part 1: Copy Top Sites Feed into the Top Sites component - r=dao,frontend-codestyle-reviewers,Standard8 2024-04-23 18:32:30 +00:00
.git-blame-ignore-revs Bug 1882465 - Update .hg-annotate-ignore-revs and .git-blame-ignore-revs to reflect firefox-android monorepo migration r=glandium,geckoview-reviewers,tthibaud 2024-04-04 14:55:00 +00:00
.gitattributes
.gitignore Bug 1894160: hgignore: simplify the egginfo pattern; r=sheehan 2024-05-01 14:54:59 +00:00
.hg-annotate-ignore-revs Bug 1882465 - Update .hg-annotate-ignore-revs and .git-blame-ignore-revs to reflect firefox-android monorepo migration r=glandium,geckoview-reviewers,tthibaud 2024-04-04 14:55:00 +00:00
.hg-format-source
.hgignore Bug 1894160: hgignore: simplify the egginfo pattern; r=sheehan 2024-05-01 14:54:59 +00:00
.hgtags No bug - tagging de27b0fc3ab30bad572ccdcd8ea161d1f9a198ad with FIREFOX_NIGHTLY_126_END a=release DONTBUILD CLOSED TREE 2024-04-15 08:26:20 +00:00
.lando.ini Bug 1871425: re-enable autoformatting after disabling WPT linter r=zeid DONTBUILD 2024-02-29 21:22:27 +00:00
.lldbinit
.mailmap Bug 1892339 - Add my name to .mailmap r=nika 2024-04-19 13:42:34 +00:00
.prettierignore Bug 1889978 - Vendor ffmpeg 7.0 headers. r=media-playback-reviewers,frontend-codestyle-reviewers,alwu 2024-04-30 14:21:45 +00:00
.prettierrc.js
.stylelintignore Bug 1864255. Move crashtests that leave window(s) open to the very end. r=dholbert,frontend-codestyle-reviewers 2024-04-21 21:37:49 +00:00
.stylelintrc.js
.taskcluster.yml
.trackerignore
.yamllint
.ycm_extra_conf.py
aclocal.m4 Bug 1881545 - Move nl_langinfo and CODESET check from js/src/old-configure.in to js/moz.configure r=glandium 2024-02-28 11:11:18 +00:00
AUTHORS
build.gradle Bug 1892641 - include timestamps in BUILDSTATUS lines from gradle, r=glandium. 2024-04-30 08:17:13 +00:00
Cargo.lock Bug 1884879 - [css-syntax] Implement recent syntax spec change to avoid parsing custom properties that look like selectors. r=firefox-style-system-reviewers,zrhoffman,supply-chain-reviewers,glandium 2024-04-30 23:49:44 +00:00
Cargo.toml Bug 1884879 - [css-syntax] Implement recent syntax spec change to avoid parsing custom properties that look like selectors. r=firefox-style-system-reviewers,zrhoffman,supply-chain-reviewers,glandium 2024-04-30 23:49:44 +00:00
client.mk
client.py
CLOBBER Bug 1889978 - Vendor ffmpeg master, after 7.0, update and reapply patch, remove old files, move bsf files into the bsf directory. r=media-playback-reviewers,alwu 2024-04-30 14:21:45 +00:00
configure
configure.py
GNUmakefile
gradle.properties
gradlew
gradlew.bat
LICENSE
mach
mach.cmd
mach.ps1
Makefile.in
mots.yaml Bug 1891780 - Add DJ and Niklas as peers for Tabbed Browser. r=zeid 2024-04-17 11:15:25 +00:00
moz.build Bug 1888321 - Rename .cargo/config.in to .cargo/config.toml.in. r=firefox-build-system-reviewers,webdriver-reviewers,ahochheiden 2024-04-01 21:26:49 +00:00
moz.configure Bug 1880424 - Move clock_monotonic check to moz.configure r=glandium 2024-02-28 11:11:17 +00:00
mozilla-config.h.in
old-configure.in Backed out changeset 4309f75eaa90 (bug 1883615) for causing build bustages related to check_symbol_in_libs. CLOSED TREE 2024-04-17 12:57:02 +03:00
package-lock.json Bug 1557040 - Remove eslint-plugin-fetch-options from the tree. r=Gijs,omc-reviewers,aminomancer,home-newtab-reviewers,frontend-codestyle-reviewers,thecount 2024-04-09 08:11:10 +00:00
package.json Bug 1557040 - Remove eslint-plugin-fetch-options from the tree. r=Gijs,omc-reviewers,aminomancer,home-newtab-reviewers,frontend-codestyle-reviewers,thecount 2024-04-09 08:11:10 +00:00
pyproject.toml
README.txt
settings.gradle Bug 1876335 - use GRADLE_MAVEN_REPOSITORIES in more places. r=owlish,geckoview-reviewers,nalexander,tthibaud,android-reviewers 2024-01-18 15:38:47 +01:00
substitute-local-geckoview.gradle
test.mozbuild

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.