Commit Graph
369 Commits
Author SHA1 Message Date
Tooru Fujisawa 036a4bf280 Bug 2038623 - Do not borrow the buffer for decoded stencils if the in-memory cache is enabled. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D299700
2026-05-11 15:33:20 +00:00
Tooru Fujisawa 62f4734928 Bug 2035556 - Immediately stop the delazification collection without dispatch. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D297074
2026-04-28 23:51:41 +00:00
Tooru Fujisawa 96ecb0e51b Bug 2031075 - Part 1: Fix the condition to clear unused stencil. r=bthrall
If the stencil navigation is enabled and the current request's stencil
is not going to be stored into the in-memory cache, we can clear it immediately.

Differential Revision: https://phabricator.services.mozilla.com/D294596
2026-04-24 19:34:40 +00:00
Tooru Fujisawa e22d4c846c Bug 2031078 - Part 6: Stop collecting delazifications on idle. r=bthrall
In order to avoid keeping the scripts and modules unnecessarily longer,
the delazification collection should also be stopped after a while.

Differential Revision: https://phabricator.services.mozilla.com/D294595
2026-04-24 14:23:12 +00:00
Tooru Fujisawa d469f1b60c Bug 2031078 - Part 5: Stop collecting delazifications on memory pressure. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294594
2026-04-24 14:23:08 +00:00
Tooru Fujisawa d6cfc25827 Bug 2031078 - Part 1: Hold scripts and modules while collecting delazifications. r=bthrall,mccr8
In order to stop collecting delazifications, hold any newly-started collections'
scripts and modules.
The later patches will add the code to stop on each situation.

Differential Revision: https://phabricator.services.mozilla.com/D294590
2026-04-24 14:22:52 +00:00
Atila Butkovits 6c7fe7e77b Revert "Bug 2031078 - Part 6: Stop collecting delazifications on idle. r=bthrall" for causing SM bustages in js.cpp.
This reverts commit 1e6f986667.

Revert "Bug 2031078 - Part 5: Stop collecting delazifications on memory pressure. r=bthrall"

This reverts commit 52e7376bc2.

Revert "Bug 2031078 - Part 4: Distinguish the call JS::StartCollectingDelazifications on a script with asm.js. r=bthrall"

This reverts commit 62233eb1f0.

Revert "Bug 2031078 - Part 3: Ignore JS::AbortCollectingDelazifications call on not-collecting cases. r=bthrall"

This reverts commit a51e0ee4eb.

Revert "Bug 2031078 - Part 2: Make JS::AbortCollectingDelazifications take raw pointer. r=bthrall"

This reverts commit 285dd9183b.

Revert "Bug 2031078 - Part 1: Hold scripts and modules while collecting delazifications. r=bthrall,mccr8"

This reverts commit 0c81cde149.
2026-04-24 04:59:09 +00:00
Tooru Fujisawa 1e6f986667 Bug 2031078 - Part 6: Stop collecting delazifications on idle. r=bthrall
In order to avoid keeping the scripts and modules unnecessarily longer,
the delazification collection should also be stopped after a while.

Differential Revision: https://phabricator.services.mozilla.com/D294595
2026-04-24 04:22:03 +00:00
Tooru Fujisawa 52e7376bc2 Bug 2031078 - Part 5: Stop collecting delazifications on memory pressure. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294594
2026-04-24 04:22:00 +00:00
Tooru Fujisawa 0c81cde149 Bug 2031078 - Part 1: Hold scripts and modules while collecting delazifications. r=bthrall,mccr8
In order to stop collecting delazifications, hold any newly-started collections'
scripts and modules.
The later patches will add the code to stop on each situation.

Differential Revision: https://phabricator.services.mozilla.com/D294590
2026-04-24 04:21:44 +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 8585e0670f Bug 2031200 - Part 6: Do not pass private value to JS::UpdateDebugMetadata. r=bthrall
There are two places that try to put the script private:
  * JS::UpdateDebugMetadata, performed conditionally
  * LoadedScript::AssociateWithScript, performed unconditionally,
    except for conditionally on the script private itself

The former is unnecessary, so that the latter covers all cases.

Differential Revision: https://phabricator.services.mozilla.com/D294338
2026-04-22 04:12:26 +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 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 0e8a2f1032 Bug 2031200 - Part 6: Do not pass private value to JS::UpdateDebugMetadata. r=bthrall
There are two places that try to put the script private:
  * JS::UpdateDebugMetadata, performed conditionally
  * LoadedScript::AssociateWithScript, performed unconditionally,
    except for conditionally on the script private itself

The former is unnecessary, so that the latter covers all cases.

Differential Revision: https://phabricator.services.mozilla.com/D294338
2026-04-21 15:57:56 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
Tooru Fujisawa ba079e276d Bug 2019337 - Part 2: Collect per-document SharedScriptCache usage telemetry. r=nbp,denispal
Differential Revision: https://phabricator.services.mozilla.com/D285028
2026-03-06 08:28:51 +00:00
Tooru Fujisawa 37c32e86de Bug 2019337 - Part 1: Use default member initializers in ScriptLoader. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D285027
2026-03-06 08:28:48 +00:00
Tom Schuster 5da523c2c7 Bug 2017102 - Integrate WAICT with script loading. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D283675
2026-03-04 01:09:06 +00:00
Serban Stanca d2b0e0df0e Revert "Bug 2017102 - Integrate WAICT with script loading. r=arai" for causing build bustages in SiteIntegrityService.h.
This reverts commit e64e92aee9.

This reverts commit 11aa1b2a8e.

This reverts commit ba19d2f5eb.

This reverts commit 3f66d522f4.
2026-03-03 21:56:30 +00:00
Tom Schuster e64e92aee9 Bug 2017102 - Integrate WAICT with script loading. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D283675
2026-03-03 20:12:23 +00:00
Yoshi Cheng-Hao Huang b267594cfd Bug 1916277 - Part 6: Implement AddToResolvedModuleSet to complete the 'resolve a module specifier' per spec. r=jonco
The addition is performed after resolution so that resolved specifiers
can be processed more easily, particularly for preload requests. This
change also refactors the return value of ResolvedModuleSpecifier to use
a SpecifierResolutionRecord instead.

Differential Revision: https://phabricator.services.mozilla.com/D272779
2026-03-03 00:52:40 +00:00
Tooru Fujisawa 2246ae01b4 Bug 2017100 - Part 3: Populate channel and loadInfo fields for http-on-resource-cache-response notification. r=nbp
Especially the nonce and the hint charset are used by the later patch.

Differential Revision: https://phabricator.services.mozilla.com/D283561
2026-02-24 10:06:50 +00:00
Tooru Fujisawa 30563b34bb Bug 2017100 - Part 2: Prepare http-on-resource-cache-response parameters only when observer exists. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D283560
2026-02-24 10:06:47 +00:00
Lando bb7d3d6ce9 Bug 2014919: apply code formatting via Lando
# ignore-this-changeset
2026-02-20 17:06:09 +00:00
Matthew Gaudet b24b7d3bb4 Bug 2014919 - Remove ShadowRealm integration code r=arai
Differential Revision: https://phabricator.services.mozilla.com/D283058
2026-02-20 17:05:47 +00:00
agoloman 71879caf1d Revert "Bug 2014919: apply code formatting via Lando" for causing marionette failures @test_evalscript.html.
This reverts commit df3fdef2fe.

Revert "Bug 2014919 - Remove ShadowRealm integration code r=arai"

This reverts commit 38d1521df4.

Revert "Bug 2014919 - Remove testing for ShadowRealms r=dminor"

This reverts commit 4715ebd9c2.

Revert "Bug 2014919 - Remove JS support for Shadowrealms r=dminor"

This reverts commit 1d01568223.

Revert "Bug 2014919 - Remove DOM ShadowRealms support  r=edgar,smaug,webidl,dom-worker-reviewers"

This reverts commit 54dde4590a.
2026-02-19 22:58:33 +00:00
Lando df3fdef2fe Bug 2014919: apply code formatting via Lando
# ignore-this-changeset
2026-02-19 21:29:26 +00:00
Matthew Gaudet 38d1521df4 Bug 2014919 - Remove ShadowRealm integration code r=arai
Differential Revision: https://phabricator.services.mozilla.com/D283058
2026-02-19 21:29:05 +00:00
Tom Schuster 9131e1c430 Bug 2012158 - Simplify the ScriptLoader by passing around an nsIChannel instead of nsIIncrementalStreamLoader. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D280284
2026-01-26 09:43:27 +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 5813946375 Bug 2002770 - Part 2: Reduce ParserMetadata size. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D274287
2025-11-27 14:08:00 +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 707e3dbad3 Bug 1997870 - Part 3: Split EncodeBytecodeAndSave into two steps. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D271034
2025-11-11 08:28:34 +00:00
Tooru Fujisawa 235f7f63b3 Bug 1997870 - Part 2: Make BytecodeMimeTypeFor methods take const. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D271033
2025-11-11 08:28:32 +00:00
Cristian Tuns adb38904a5 Revert "Bug 1997870 - Part 4: Perform the encoding and the compression off main thread. r=bthrall" for causing build bustages in SharedScriptCache.cpp
This reverts commit c6b62c4029.

Revert "Bug 1997870 - Part 3: Split EncodeBytecodeAndSave into two steps. r=bthrall"

This reverts commit f6fed9057d.

Revert "Bug 1997870 - Part 2: Make BytecodeMimeTypeFor methods take const. r=bthrall"

This reverts commit 751adfcc4b.

Revert "Bug 1997870 - Part 1: Remove obsolete comment. r=bthrall"

This reverts commit cc15fbf365.
2025-11-10 12:12:57 +00:00
Tooru Fujisawa f6fed9057d Bug 1997870 - Part 3: Split EncodeBytecodeAndSave into two steps. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D271034
2025-11-10 11:32:36 +00:00
Tooru Fujisawa 751adfcc4b Bug 1997870 - Part 2: Make BytecodeMimeTypeFor methods take const. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D271033
2025-11-10 11:32:33 +00:00
Tooru Fujisawa 905ed24b39 Bug 1980154 - Part 2: Factor out the disk cache strategy into ScriptLoader::GetDiskCacheStrategy. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D270522
2025-10-31 05:24:25 +00:00
Tooru Fujisawa 3853c05fdf Bug 1980154 - Part 1: Make EncodeBytecodeAndSave a static function. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D270521
2025-10-31 05:24:23 +00:00
Tooru Fujisawa e2c0a7ace6 Bug 1991438 - Use an array of LoadedScript for the disk queue. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269524
2025-10-23 04:19:22 +00:00
Tooru Fujisawa 32c285e820 Bug 1992341 - Part 6: Update the method names and comments. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269523
2025-10-23 04:19:20 +00:00
Tooru Fujisawa d26b0876c9 Bug 1992341 - Part 5: Stop using the cache queue for in-memory cache. r=nbp
Given the in-memory cache no longer need any operation once it's stored into
the in-memory cache and we start collecting the delazifications, the
cache queue needs to be used only for disk cache.

Differential Revision: https://phabricator.services.mozilla.com/D269522
2025-10-23 04:19:18 +00:00
Tooru Fujisawa fe52c48fe7 Bug 1991607 - Part 9: Pass URI to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267358
2025-10-22 11:20:56 +00:00
Tooru Fujisawa 1e6cf884b0 Bug 1991607 - Part 7: Pass FetchOptions to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267356
2025-10-22 11:20:51 +00:00
Tooru Fujisawa 2d1895402a Bug 1991607 - Part 5: Pass ReferrerPolicy to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang
In order to remove ScriptLoadRequest::mReferrerPolicy field, we should directly
pass ReferrerPolicy to the LoadedScript constructor.

Differential Revision: https://phabricator.services.mozilla.com/D267354
2025-10-22 11:20:46 +00:00
Tooru Fujisawa 3023c2506a Bug 1991607 - Part 2: Let ScriptLoader::CheckContentPolicy receive LoadedScript-related parameters separately. r=bthrall
In the same way as Part 1, CheckContentPolicy can be called before LoadedScript
is created, and it should receive related parameters separately in addition to
ScriptLoadRequest.

Differential Revision: https://phabricator.services.mozilla.com/D267350
2025-10-22 11:20:38 +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
Tooru Fujisawa 10dc4e2bc0 Bug 1991607 - Part 9: Pass URI to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267358
2025-10-22 04:38:14 +00:00
Tooru Fujisawa f48d2160e1 Bug 1991607 - Part 7: Pass FetchOptions to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267356
2025-10-22 04:38:08 +00:00