Commit Graph
109 Commits
Author SHA1 Message Date
Tooru Fujisawa f2463cd050 Bug 2031074 - Remove nsIMemoryReporter interface from LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D295199
2026-04-25 18:33:06 +00:00
Tooru Fujisawa 4eddb4c65f Bug 2033379 - Part 1: Remove EventScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D295235
2026-04-25 18:32:58 +00:00
Tooru Fujisawa 7e75539d07 Bug 2031077 - Part 3: Repurpose LoadedScript::mStencil only for the cached case. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294600
2026-04-25 04:54:31 +00:00
Tooru Fujisawa dfc61e3c96 Bug 2031200 - Part 12: Remove ModuleScript::mForPreload. r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D295268
2026-04-22 04:12:47 +00:00
Tooru Fujisawa edcea6935f Bug 2031200 - Part 11: Repurpose LoadedScript::mReferrerPolicy for the cached case. r=bthrall
Same as base URL, the mReferrerPolicy reflects the server response, and it
need to be retained for the cached case.
The existing consumers use the ScriptFetchInfo field.

Differential Revision: https://phabricator.services.mozilla.com/D294343
2026-04-22 04:12:44 +00:00
Tooru Fujisawa bd431250d5 Bug 2031200 - Part 10: Repurpose LoadedScript::mBaseURL for the cached case. r=bthrall
The existing consumers of the base URL now use the
ScriptFetchInfo::mBaseURL, and then the LoadedScript::mBaseURL
is renmaed to LoadedScript::mCachedBaseURL, used only by cached stencil case,
to retain the server responses for the subsequent requests.

Differential Revision: https://phabricator.services.mozilla.com/D294342
2026-04-22 04:12:40 +00:00
Tooru Fujisawa 60050df3f8 Bug 2031200 - Part 9: Add ScriptLoadRequest::FetchOptions() accessor and remove LoadedScript::mFetchOptions. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294341
2026-04-22 04:12:37 +00:00
Tooru Fujisawa 83c3d50d82 Bug 2031200 - Part 7: Use ScriptFetchInfo for the script private and module private instead of LoadedScript. r=bthrall,allstarschh,dom-worker-reviewers,asuth
Replace the all places that stores and uses the script/module private to use
ScriptFetchInfo instead of LoadedScript/ModuleScript, so that the
LoadedScript/ModuleScript can be released earlier.

Differential Revision: https://phabricator.services.mozilla.com/D294339
2026-04-22 04:12:30 +00:00
Tooru Fujisawa 3fbbad3664 Bug 2031200 - Part 5: Sync ModuleScript::mForPreload and ScriptFetchInfo::mIsForModulePreload. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294337
2026-04-22 04:12:23 +00:00
Tooru Fujisawa 6951bb5756 Bug 2031200 - Part 4: Sync LoadedScript::mBaseURL and ScriptFetchInfo::mBaseURL. r=bthrall,dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D294336
2026-04-22 04:12:19 +00:00
Tooru Fujisawa 0665704082 Bug 2031200 - Part 1: Add ScriptFetchInfo class and ScriptLoadRequest::mFetchInfo field. r=bthrall
ScriptFetchInfo will replace the overlapping LoadedScript fields
and then it will be used for the script/module private, to propagate the
information to the imported modules, without holding the other LoadedScript
fields, especially the response body and the compiled stencil.

Differential Revision: https://phabricator.services.mozilla.com/D294333
2026-04-22 04:12:09 +00:00
Alexandru Marc bcdf79e032 Revert "Bug 2031200 - Part 12: Remove ModuleScript::mForPreload. r=allstarschh" for causing hazard bustages @ ModuleLoaderBase
This reverts commit 260ad06a2e.

Revert "Bug 2031200 - Part 11: Repurpose LoadedScript::mReferrerPolicy for the cached case. r=bthrall"

This reverts commit cedffcba4e.

Revert "Bug 2031200 - Part 10: Repurpose LoadedScript::mBaseURL for the cached case. r=bthrall"

This reverts commit a4fd83ce4d.

Revert "Bug 2031200 - Part 9: Add ScriptLoadRequest::FetchOptions() accessor and remove LoadedScript::mFetchOptions. r=bthrall"

This reverts commit 66bc9492b3.

Revert "Bug 2031200 - Part 8: Remove ScriptHashKey constructor with LoadedScript. r=bthrall"

This reverts commit 5bb4928c8f.

Revert "Bug 2031200 - Part 7: Use ScriptFetchInfo for the script private and module private instead of LoadedScript. r=bthrall,allstarschh,dom-worker-reviewers,asuth"

This reverts commit 0011dfbdcc.

Revert "Bug 2031200 - Part 6: Do not pass private value to JS::UpdateDebugMetadata. r=bthrall"

This reverts commit 0e8a2f1032.

Revert "Bug 2031200 - Part 5: Sync ModuleScript::mForPreload and ScriptFetchInfo::mIsForModulePreload. r=bthrall"

This reverts commit 0f69b1fb94.

Revert "Bug 2031200 - Part 4: Sync LoadedScript::mBaseURL and ScriptFetchInfo::mBaseURL. r=bthrall,dom-worker-reviewers,asuth"

This reverts commit 472f447c9e.

Revert "Bug 2031200 - Part 3: Sync LoadedScript::mReferrerPolicy and ScriptFetchInfo::mReferrerPolicy. r=bthrall"

This reverts commit b5410280f5.

Revert "Bug 2031200 - Part 2: Remove obsolete code to sync the exact same field. r=bthrall"

This reverts commit 2b784b6e6f.

Revert "Bug 2031200 - Part 1: Add ScriptFetchInfo class and ScriptLoadRequest::mFetchInfo field. r=bthrall"

This reverts commit fc8d3b6c48.
2026-04-21 21:28:08 +00:00
Tooru Fujisawa 260ad06a2e Bug 2031200 - Part 12: Remove ModuleScript::mForPreload. r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D295268
2026-04-21 15:58:17 +00:00
Tooru Fujisawa cedffcba4e Bug 2031200 - Part 11: Repurpose LoadedScript::mReferrerPolicy for the cached case. r=bthrall
Same as base URL, the mReferrerPolicy reflects the server response, and it
need to be retained for the cached case.
The existing consumers use the ScriptFetchInfo field.

Differential Revision: https://phabricator.services.mozilla.com/D294343
2026-04-21 15:58:13 +00:00
Tooru Fujisawa a4fd83ce4d Bug 2031200 - Part 10: Repurpose LoadedScript::mBaseURL for the cached case. r=bthrall
The existing consumers of the base URL now use the
ScriptFetchInfo::mBaseURL, and then the LoadedScript::mBaseURL
is renmaed to LoadedScript::mCachedBaseURL, used only by cached stencil case,
to retain the server responses for the subsequent requests.

Differential Revision: https://phabricator.services.mozilla.com/D294342
2026-04-21 15:58:10 +00:00
Tooru Fujisawa 66bc9492b3 Bug 2031200 - Part 9: Add ScriptLoadRequest::FetchOptions() accessor and remove LoadedScript::mFetchOptions. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294341
2026-04-21 15:58:06 +00:00
Tooru Fujisawa 0011dfbdcc Bug 2031200 - Part 7: Use ScriptFetchInfo for the script private and module private instead of LoadedScript. r=bthrall,allstarschh,dom-worker-reviewers,asuth
Replace the all places that stores and uses the script/module private to use
ScriptFetchInfo instead of LoadedScript/ModuleScript, so that the
LoadedScript/ModuleScript can be released earlier.

Differential Revision: https://phabricator.services.mozilla.com/D294339
2026-04-21 15:57:59 +00:00
Tooru Fujisawa 0f69b1fb94 Bug 2031200 - Part 5: Sync ModuleScript::mForPreload and ScriptFetchInfo::mIsForModulePreload. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294337
2026-04-21 15:57:52 +00:00
Tooru Fujisawa 472f447c9e Bug 2031200 - Part 4: Sync LoadedScript::mBaseURL and ScriptFetchInfo::mBaseURL. r=bthrall,dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D294336
2026-04-21 15:57:48 +00:00
Tooru Fujisawa fc8d3b6c48 Bug 2031200 - Part 1: Add ScriptFetchInfo class and ScriptLoadRequest::mFetchInfo field. r=bthrall
ScriptFetchInfo will replace the overlapping LoadedScript fields
and then it will be used for the script/module private, to propagate the
information to the imported modules, without holding the other LoadedScript
fields, especially the response body and the compiled stencil.

Differential Revision: https://phabricator.services.mozilla.com/D294333
2026-04-21 15:57:38 +00:00
Sylvestre Ledru d2b4f9d727 Bug 2023419 - Remove Emacs/Vim modelines from js/ r=emilio,nbp
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287851
2026-04-03 07:40:15 +00:00
Alexandru Marc c565130f5c Revert "Bug 2023419 - Remove Emacs/Vim modelines from js/ r=emilio,nbp" for causing SM bustages @ Debugger-findScripts-12.js
This reverts commit 631e966bff.
2026-03-17 16:04:32 +00:00
Sylvestre Ledru 631e966bff Bug 2023419 - Remove Emacs/Vim modelines from js/ r=emilio,nbp
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287851
2026-03-17 15:44:27 +00:00
Tooru Fujisawa 3133642cd0 Bug 2019337 - Part 3: Collect per-process SharedScriptCache usage telemetry. r=nbp,denispal
Differential Revision: https://phabricator.services.mozilla.com/D285647
2026-03-06 08:28:54 +00:00
Tooru Fujisawa 39a8e3b5bd Bug 2020958 - Use the correct fetch option when nonce is different than the cached one. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D286010
2026-03-05 08:21:06 +00:00
Yoshi Cheng-Hao Huang cb89c5ad77 Bug 1916277 - Part 12: Add ModuleScript::ResetPreload. r=jonco
Reset modules information happened during preload.

Differential Revision: https://phabricator.services.mozilla.com/D278656
2026-03-03 00:52:54 +00:00
Yoshi Cheng-Hao Huang 8377cfe15c Bug 1916277 - Part 10: Add a debug slot [[IsPreload]] in ModuleObject. r=jonco
This will allow us to identify the module is loaded during preloading
phase.

Differential Revision: https://phabricator.services.mozilla.com/D281155
2026-03-03 00:52:49 +00:00
Yoshi Cheng-Hao Huang 14a186766a Bug 1916277 - Part 9: Store Preloaded resolved set in the root moduleScript. r=jonco
Allocate a ResolvedModuleSet in the top-level preloading module script, and
use the `aHostDefined` parameter in HostLoadImportedModule to get the
corresponding preloaded ResolvedModuleSet.

Differential Revision: https://phabricator.services.mozilla.com/D272782
2026-03-03 00:52:47 +00:00
Florian Quèze 49c056baf4 Bug 2019756 - Include script URLs in CC graph descriptions for LoadedScript, Module and ModuleEnvironmentObject, r=mccr8,spidermonkey-reviewers,arai.
LoadedScript nodes in the CC graph now include their URI, e.g.
"LoadedScript resource://testing-common/FooTestUtils.sys.mjs" instead
of just "LoadedScript". Module and ModuleEnvironmentObject JS objects
now include their filename, e.g. "JS Object (Module - .../foo.sys.mjs)".

This makes leak retention paths from ShutdownLeakPathFinder much more
actionable since the root and intermediate module nodes now show which
script is responsible.

Differential Revision: https://phabricator.services.mozilla.com/D285130
2026-02-28 00:30:53 +00:00
Tooru Fujisawa 212aac6e6c Bug 2017052 - Part 2: Put SRIMetadata into LoadedScript. r=nbp
This makes the SRIMetadata for the first request a part of LoadedScript,
with defaulting to a nullptr for empty SRIMetadata.

The next patch will remove SRIMetadata from ScriptCacheKey, which allows
reducing the size of the cache when SRIMetadata is not given.

Differential Revision: https://phabricator.services.mozilla.com/D283541
2026-02-24 02:24:24 +00:00
Tooru Fujisawa 337d0867f3 Bug 2015382 - Do not handle LoadedScript::mCacheEntry in cycle-collection. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D282411
2026-02-12 04:32:44 +00:00
Tooru Fujisawa 9d133a2982 Bug 2015375 - Do not traverse ScriptFetchOptions in cycle-collection. r=nbp,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D282410
2026-02-12 04:32:41 +00:00
Tooru Fujisawa 808acd2fd7 Bug 2012948 - Part 3: Include LoadedScript::mFetchOptions in the memory reporting. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D280881
2026-02-02 04:56:53 +00:00
iulian moraru a1a18390a2 Revert "Bug 2012948 - Part 5: Include CompleteSubResource::mNetworkMetadata in the memory reporting. r=emilio,firefox-style-system-reviewers" for causing macos build bustages on nsITimedChannel.h.
This reverts commit b6f2966e33.

Revert "Bug 2012948 - Part 4: Add nsHttpResponseHead::{SizeOfIncludingThis,SizeOfExcludingThis}. r=necko-reviewers,valentin"

This reverts commit da2a835aed.

Revert "Bug 2012948 - Part 3: Include LoadedScript::mFetchOptions in the memory reporting. r=bthrall"

This reverts commit 27e91538d3.

Revert "Bug 2012948 - Part 2: Include CacheablePerformanceTimingData::mServerTiming in the memory reporting. r=smaug"

This reverts commit b6c600c3b2.

Revert "Bug 2012948 - Part 1: Add nsIServerTiming::sizeOfIncludingThis. r=necko-reviewers,kershaw"

This reverts commit 9b2105fa84.
2026-02-01 17:52:17 +00:00
Tooru Fujisawa 27e91538d3 Bug 2012948 - Part 3: Include LoadedScript::mFetchOptions in the memory reporting. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D280881
2026-02-01 17:21:36 +00:00
Sandor Molnar e480af4ade Revert "Bug 2012948 - Part 5: Include CompleteSubResource::mNetworkMetadata in the memory reporting. r=emilio,firefox-style-system-reviewers" for causing macos build bustages @ nsITimedChannel.h
This reverts commit 32a8d8c15c.

Revert "Bug 2012948 - Part 4: Add nsHttpResponseHead::{SizeOfIncludingThis,SizeOfExcludingThis}. r=necko-reviewers,valentin"

This reverts commit bac0e48cc2.

Revert "Bug 2012948 - Part 3: Include LoadedScript::mFetchOptions in the memory reporting. r=bthrall"

This reverts commit d287be2a96.

Revert "Bug 2012948 - Part 2: Include CacheablePerformanceTimingData::mServerTiming in the memory reporting. r=smaug"

This reverts commit 6e711774cd.

Revert "Bug 2012948 - Part 1: Add nsIServerTiming::sizeOfIncludingThis. r=necko-reviewers,kershaw"

This reverts commit 7a4d91985e.
2026-02-01 06:25:50 +00:00
Tooru Fujisawa d287be2a96 Bug 2012948 - Part 3: Include LoadedScript::mFetchOptions in the memory reporting. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D280881
2026-02-01 05:32:16 +00:00
Tooru Fujisawa fb321bdf9c Bug 2004064 - Yield to other tasks before processing long defer scripts if no FCP have happened. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D275741
2025-12-17 21:04:04 +00:00
Tooru Fujisawa 617d3747f1 Bug 2002960 - Part 3: Use nsICacheEntryWriteHandle in LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D274398
2025-12-10 10:29:23 +00:00
agoloman a92ad13839 Revert "Bug 2002960, Bug 2002954 - Part 3: Use nsICacheEntryWriteHandle in LoadedScript. r=nbp" for causing build bustages @nsHttpChannel.cpp.
This reverts commit 1efe30299a.

Revert "Bug 2002960 - Part 2: Tweak the branches in ScriptLoader::OnStreamComplete to avoid unnecessary operations. r=nbp"

This reverts commit e967997339.

Revert "Bug 2002960 - Part 1: Eagerly reflect the necko fetch count to LoadedScript. r=nbp"

This reverts commit b096c129a4.

Revert "Bug 2002954 - Add nsICacheEntryWriteHandle and PCacheEntryWriteHandle to expose the nsICacheEntry::openAlternativeOutputStream to content process. r=valentin,necko-reviewers"

This reverts commit ca6e20dc42.
2025-12-09 08:05:11 +00:00
Tooru Fujisawa 1efe30299a Bug 2002960 - Part 3: Use nsICacheEntryWriteHandle in LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D274398
2025-12-09 07:22:17 +00:00
Tooru Fujisawa 37544fc471 Bug 2002781 - Part 2: Report stencils held by the shared script cache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D274544
2025-12-02 01:28:44 +00:00
Tooru Fujisawa fb06302042 Bug 1907011 - Part 7: Update the most of the remaining usage of "bytecode" and update document. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D273960
2025-11-26 04:13:26 +00:00
Tooru Fujisawa 1b4989c103 Bug 1907011 - Part 6: Rename LoadedScript::mBytecodeOffset to LoadedScript::mSerializedStencilOffset. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D273959
2025-11-26 04:13:23 +00:00
Tooru Fujisawa 96dcf3b3c5 Bug 1907011 - Part 5: Rename LoadedScript::mSRIAndBytecode to LoadedScript::mSRIAndSerializedStencil. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D273958
2025-11-26 04:13:20 +00:00
Tooru Fujisawa ae2826ed85 Bug 1998925 - Part 1: Add dirty flag to LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D271875
2025-11-19 03:47:14 +00:00
Tooru Fujisawa 3cab1a6f1a Bug 1991607 - Part 11: Remove ScriptLoadRequest::mBaseURL. r=bthrall,dom-worker-reviewers,edenchuang
In contrast to other fields, mBaseURL is not populated in the constructors.
Thus we just need to remove the ScriptLoadRequest::mBaseURL field and
use the LoadedScript::mBaseURL instead.

Differential Revision: https://phabricator.services.mozilla.com/D267360
2025-10-22 11:21:01 +00:00
Tooru Fujisawa cde6c638b3 Bug 1991607 - Part 10: Remove ScriptLoadRequest::mURI. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267359
2025-10-22 11:20:59 +00:00
Tooru Fujisawa c15f0967dd Bug 1991607 - Part 4: Add ImportMapScript subclass for LoadedScript. r=bthrall
ScriptLoadRequest::mKind == eImportMap case has been using
LoadedScript::mKind == eClassic.
This patch solves this inconsistency by introducing another subclass.

Differential Revision: https://phabricator.services.mozilla.com/D267353
2025-10-22 11:20:43 +00:00
Atila Butkovits 13ff5f1bad Revert "Bug 1991607 - Part 12: Reorder ScriptLoadRequest/ModuleLoadRequest fields. r=bthrall" for causing bustages at LoadedScript.cpp.
This reverts commit 30499d5cdc.

Revert "Bug 1991607 - Part 11: Remove ScriptLoadRequest::mBaseURL. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit 85324622ab.

Revert "Bug 1991607 - Part 10: Remove ScriptLoadRequest::mURI. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit 3b1afd5ca0.

Revert "Bug 1991607 - Part 9: Pass URI to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit 10dc4e2bc0.

Revert "Bug 1991607 - Part 8: Remove ScriptLoadRequest::mFetchOptions. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit b4c09eb6e1.

Revert "Bug 1991607 - Part 7: Pass FetchOptions to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit f48d2160e1.

Revert "Bug 1991607 - Part 6: Remove ScriptLoadRequest::mReferrerPolicy. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit a6901c3f1d.

Revert "Bug 1991607 - Part 5: Pass ReferrerPolicy to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit c2b5cb885a.

Revert "Bug 1991607 - Part 4: Add ImportMapScript subclass for LoadedScript. r=bthrall"

This reverts commit 09b8ae44b8.

Revert "Bug 1991607 - Part 3: Make LoadedScript::mKind field const. r=bthrall"

This reverts commit 3eebccc479.

Revert "Bug 1991607 - Part 2: Let ScriptLoader::CheckContentPolicy receive LoadedScript-related parameters separately. r=bthrall"

This reverts commit dd8530cb71.

Revert "Bug 1991607 - Part 1: Let ScriptHashKey and ScriptLoadData receive LoadedScript-related parameters separately. r=bthrall"

This reverts commit b4a4f94096.
2025-10-22 05:40:38 +00:00