LoadedScript has been cycle-collected only to allow ModuleScript being
cycle-collected.
Given that ModuleScript is no longer its subclass, LoadedScript doesn't have
to be cycle-collectated.
Differential Revision: https://phabricator.services.mozilla.com/D299918
All LoadedScript subclasses has no extra fields, and also no ScriptKind-specific
consumers.
Just using LoadedScript class everywhere is sufficient.
Differential Revision: https://phabricator.services.mozilla.com/D299917
ModuleScript is used only as the place to hold the compilation and evaluation
result of modules, and it's no longer necessary to be a LoadedScript subclass.
This makes all LoadedScript instances GC-free, and the module's LoadedScript
(temporailry renamed to LoadedModuleScript) can directly be stored into the
SharedScriptCache.
The subsequent patches will cleanup the LoadedScript, its subclasses, and
their consumers.
Differential Revision: https://phabricator.services.mozilla.com/D299916
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
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
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
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
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.
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
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
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
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
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
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
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
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.
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.
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.