Commit Graph
1163 Commits
Author SHA1 Message Date
Tooru Fujisawa 9d70740b32 Bug 1994617 - Part 2: Add CachingPlan::NotCacheable. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D270102
2025-10-29 09:39:45 +00:00
Tooru Fujisawa 6ed00c0dbe Bug 1994617 - Part 1: Remove the redundacheck for inline scripts. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D270101
2025-10-29 09:39:43 +00:00
Tooru Fujisawa 023a9d0abd Bug 1996181 - Drop the disk cache references on compilation failure. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D270070
2025-10-28 17:38:17 +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 01d03687c0 Bug 1992341 - Part 4: Reflect the bytecode encoding info to other functions. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269521
2025-10-23 04:19:15 +00:00
Tooru Fujisawa 11169efd0e Bug 1992341 - Part 3: Assert or clear the disk-cache-related info in CalculateCacheFlag. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269520
2025-10-23 04:19:13 +00:00
Tooru Fujisawa e47be3d376 Bug 1992341 - Part 2: Calculate the SRI hash only when the disk cache reference exists. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269519
2025-10-23 04:19:11 +00:00
Tooru Fujisawa 793840c062 Bug 1992341 - Part 1: Move the DiskCacheReference handling into ScriptLoader. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269518
2025-10-23 04:19:08 +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 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 9cd82d3aa1 Bug 1991607 - Part 8: Remove ScriptLoadRequest::mFetchOptions. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267357
2025-10-22 11:20:53 +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 37731eea18 Bug 1991607 - Part 6: Remove ScriptLoadRequest::mReferrerPolicy. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267355
2025-10-22 11:20:48 +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
Tooru Fujisawa 64ff55f333 Bug 1991607 - Part 1: Let ScriptHashKey and ScriptLoadData receive LoadedScript-related parameters separately. r=bthrall
This is a preparation for the later patches.

ScriptFetchOptions and URI fields are duplicated between ScriptLoadRequest and
LoadedScript, and this patch stack is going to remove them from
ScriptLoadRequest.

At the point of ScriptLoader::TryUseCache, LoadedScript is not yet created,
and ScriptHashKey needs to receive ScriptFetchOptions and URI in addition to
ScriptLoadRequest.

In order to avoid misuse, ScriptHashKey constructor is split into two variants.
One receives ScriptLoadRequest+ScriptFetchOptions+nsIURI, which is for
the case LoadedScript is not yet created,
and the other receives ScriptLoadRequest+LoadedScript, which is for the case
LoadedScript is already created.

Differential Revision: https://phabricator.services.mozilla.com/D267349
2025-10-22 11:20:36 +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 85324622ab 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 04:38:20 +00:00
Tooru Fujisawa 3b1afd5ca0 Bug 1991607 - Part 10: Remove ScriptLoadRequest::mURI. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267359
2025-10-22 04:38:17 +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 b4c09eb6e1 Bug 1991607 - Part 8: Remove ScriptLoadRequest::mFetchOptions. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267357
2025-10-22 04:38:11 +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
Tooru Fujisawa a6901c3f1d Bug 1991607 - Part 6: Remove ScriptLoadRequest::mReferrerPolicy. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267355
2025-10-22 04:38:06 +00:00
Tooru Fujisawa c2b5cb885a 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 04:38:03 +00:00
Tooru Fujisawa dd8530cb71 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 04:37:55 +00:00
Tooru Fujisawa b4a4f94096 Bug 1991607 - Part 1: Let ScriptHashKey and ScriptLoadData receive LoadedScript-related parameters separately. r=bthrall
This is a preparation for the later patches.

ScriptFetchOptions and URI fields are duplicated between ScriptLoadRequest and
LoadedScript, and this patch stack is going to remove them from
ScriptLoadRequest.

At the point of ScriptLoader::TryUseCache, LoadedScript is not yet created,
and ScriptHashKey needs to receive ScriptFetchOptions and URI in addition to
ScriptLoadRequest.

In order to avoid misuse, ScriptHashKey constructor is split into two variants.
One receives ScriptLoadRequest+ScriptFetchOptions+nsIURI, which is for
the case LoadedScript is not yet created,
and the other receives ScriptLoadRequest+LoadedScript, which is for the case
LoadedScript is already created.

Differential Revision: https://phabricator.services.mozilla.com/D267349
2025-10-22 04:37:52 +00:00
Tooru Fujisawa e90d025bb7 Bug 1991370 - Part 2: Use FrontendContext-based EncodeStencil in DOM ScriptLoader. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D266623
2025-10-21 15:17:15 +00:00
Tooru Fujisawa 75ecc00217 Bug 1991380 - Remove MarkedForCache state from the caching plan. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266621
2025-10-20 17:48:28 +00:00
Henri Sivonen b1685935b1 Bug 1968903 - Avoid creating script and CSS loaders for documents loaded as data. r=firefox-style-system-reviewers,emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D264779
2025-10-20 15:49:01 +00:00
Tooru Fujisawa 1d9354174a Bug 1991358 - Part 3: Remove ScriptLoadRequest::MarkScriptForCache and ModuleLoadRequest::MarkModuleForCache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266620
2025-10-20 11:49:54 +00:00
Tooru Fujisawa 3cfcdb4caa Bug 1991358 - Part 1: Stop performing JS::FinishCollectingDelazifications/JS::AbortCollectingDelazifications. r=nbp
Now the effect of JS::FinishCollectingDelazifications is only to
stop collecting delazifications, which is not necessary for the consumer's side.
The cost of collecting delazification is also negligible with the
InitialStencilAndDelazifications structure, and also keeping the stencil
reference won't result in too much trouble.

Differential Revision: https://phabricator.services.mozilla.com/D266618
2025-10-20 11:49:50 +00:00
Adam Vandolder 091adff761 Bug 1978237 - Check for null before attempting to get document URI when ScriptLoader is reporting to the console. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D258259
2025-10-16 20:09:48 +00:00
Mathew Hodson f212adc98d Bug 1286822 - Remove beforescriptexecute/afterscriptexecute events r=webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D264718
2025-10-16 15:34:35 +00:00
Tooru Fujisawa 2f7193e255 Bug 1991081 - Part 7: Rewrite EncodeBytecodeAndSave with LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266617
2025-10-16 09:05:52 +00:00
Tooru Fujisawa 3fc5977ee9 Bug 1991081 - Part 6: Remove testing-only events from EncodeBytecodeAndSave. r=nbp
scriptloader_bytecode_saved and scriptloader_bytecode_failed are
testing-only events.  The tests use them are disabled right now,
and they should be rewritten with the updated cache mechanism.

Differential Revision: https://phabricator.services.mozilla.com/D266616
2025-10-16 09:05:50 +00:00
Tooru Fujisawa 14761bfc83 Bug 1991081 - Part 5: Use single field for SRI and optional bytecode, for bytecode case and for cached stencil case. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266615
2025-10-16 09:05:47 +00:00
Tooru Fujisawa 478fa236ad Bug 1991081 - Part 4: Use LoadedScript for logging in EncodeBytecodeAndSave. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266614
2025-10-16 09:05:44 +00:00
Tooru Fujisawa 2aa5d00aaf Bug 1991081 - Part 3: Store nsICacheInfoChannel to LoadedScript also in text and bytecode variants. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266613
2025-10-16 09:05:41 +00:00
Tooru Fujisawa 3f9a88662a Bug 1991081 - Part 2: Store stencil to LoadedScript also in text and bytecode variants. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266612
2025-10-16 09:05:39 +00:00
Tooru Fujisawa 1257f9e671 Bug 1991081 - Part 1: Rename Stencil variant to CachedStencil in LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266610
2025-10-16 09:05:36 +00:00
agoloman 3352c88229 Revert "Bug 1991081 - Part 7: Rewrite EncodeBytecodeAndSave with LoadedScript. r=nbp" for causing failures @LoadedScript.h.
This reverts commit b10b7c8add.

Revert "Bug 1991081 - Part 6: Remove testing-only events from EncodeBytecodeAndSave. r=nbp"

This reverts commit caf275708e.

Revert "Bug 1991081 - Part 5: Use single field for SRI and optional bytecode, for bytecode case and for cached stencil case. r=nbp"

This reverts commit 86631a6e10.

Revert "Bug 1991081 - Part 4: Use LoadedScript for logging in EncodeBytecodeAndSave. r=nbp"

This reverts commit 0f9d7f11e8.

Revert "Bug 1991081 - Part 3: Store nsICacheInfoChannel to LoadedScript also in text and bytecode variants. r=nbp"

This reverts commit 370f5bcd48.

Revert "Bug 1991081 - Part 2: Store stencil to LoadedScript also in text and bytecode variants. r=nbp"

This reverts commit 7eaf4f425f.

Revert "Bug 1991081 - Part 1: Rename Stencil variant to CachedStencil in LoadedScript. r=nbp"

This reverts commit a7a6ce8f6f.
2025-10-15 13:30:07 +00:00
Tooru Fujisawa b10b7c8add Bug 1991081 - Part 7: Rewrite EncodeBytecodeAndSave with LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266617
2025-10-15 09:44:20 +00:00
Tooru Fujisawa caf275708e Bug 1991081 - Part 6: Remove testing-only events from EncodeBytecodeAndSave. r=nbp
scriptloader_bytecode_saved and scriptloader_bytecode_failed are
testing-only events.  The tests use them are disabled right now,
and they should be rewritten with the updated cache mechanism.

Differential Revision: https://phabricator.services.mozilla.com/D266616
2025-10-15 09:44:17 +00:00
Tooru Fujisawa 86631a6e10 Bug 1991081 - Part 5: Use single field for SRI and optional bytecode, for bytecode case and for cached stencil case. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266615
2025-10-15 09:44:15 +00:00
Tooru Fujisawa 0f9d7f11e8 Bug 1991081 - Part 4: Use LoadedScript for logging in EncodeBytecodeAndSave. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266614
2025-10-15 09:44:12 +00:00
Tooru Fujisawa 370f5bcd48 Bug 1991081 - Part 3: Store nsICacheInfoChannel to LoadedScript also in text and bytecode variants. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266613
2025-10-15 09:44:09 +00:00
Tooru Fujisawa 7eaf4f425f Bug 1991081 - Part 2: Store stencil to LoadedScript also in text and bytecode variants. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266612
2025-10-15 09:44:07 +00:00