Commit Graph
177 Commits
Author SHA1 Message Date
agoloman c75e2e420f Revert "Bug 2020707, Bug 2020704 - Part 6: Update test expectations now that speculationrules scripts are supported. r=dom-core-reviewers,jjaschke" for causing bc failures @browser_misused_characters_in_strings.js.
This reverts commit 524a1fc191.

Revert "Bug 2020707 - Part 5: Gate speculation rules script support behind a pref. r=dom-core-reviewers,jjaschke"

This reverts commit 11741d18ad.

Revert "Bug 2020707 - Part 4: Unregister speculation rules when their script element is removed. r=dom-core-reviewers,hsivonen"

This reverts commit 5202943dc9.

Revert "Bug 2020707 - Part 3: Report an exception if speculation rules parsing fails. r=dom-core-reviewers,jjaschke"

This reverts commit 70c5aa5425.

Revert "Bug 2020707 - Part 2: Add support for speculationrules script type. r=dom-core-reviewers,jjaschke"

This reverts commit 65b30a350b.

Revert "Bug 2020707 - Part 1: Allow speculation rules to be registered to the document from scripts. r=hsivonen,jjaschke"

This reverts commit 28c7050de9.

Revert "Bug 2020704 - Part 2: Add parser for speculation rule sets. r=hsivonen,jjaschke"

This reverts commit eabb8c6eb3.

Revert "Bug 2020704 - Part 1: Add speculation rules crate. r=dom-core-reviewers,jjaschke"

This reverts commit cd65bed005.
2026-06-12 06:28:05 +00:00
Adam Vandolder 65b30a350b Bug 2020707 - Part 2: Add support for speculationrules script type. r=dom-core-reviewers,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D286178
2026-06-12 04:48:27 +00:00
Tooru Fujisawa b1578b8a63 Bug 2036849 - Part 8: Rewrite the IsTextSource and IsSerializedStencil accessors for the ScriptLoadRequest to avoid accidental use after converting to cache. r=nbp,dom-worker-reviewers,asuth
LoadedScript::{IsTextSource,IsSerializedStencil} accessors can return
false once it's converted to cache.
Most of the consumers need the flag to branch on the server response, before
converting to cache.
Add assertions to avoid accidental use.

Differential Revision: https://phabricator.services.mozilla.com/D299926
2026-05-13 17:09:56 +00:00
Tooru Fujisawa 5026dda743 Bug 2036849 - Part 3: Use ScriptLoadRequest::IsRetrievedFromMemoryCache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D299921
2026-05-13 17:09:37 +00:00
Tooru Fujisawa c6ec62c0e5 Bug 2036849 - Part 2: Add ScriptLoadRequest::IsRetrievedFromMemoryCache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D299920
2026-05-13 17:09:33 +00:00
Tooru Fujisawa 32c2970f79 Bug 2036042 - Handle invalidated cached stencil also as cached case. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D297796
2026-05-04 18:20:20 +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 c015fa524d Bug 2031077 - Part 2: Add ScriptLoadRequest::mStencil field to hold the stencil until the instantiation. r=bthrall
In order to clarify the ownership and the expected lifetime,
the stencil should be held by the ScriptLoadRequest, until it's instantiated.

The later patch will remove LoadedScript::mStencil for non-cached case.

Differential Revision: https://phabricator.services.mozilla.com/D294599
2026-04-25 04:54:27 +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 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 8b3885c09a Bug 2031200 - Part 3: Sync LoadedScript::mReferrerPolicy and ScriptFetchInfo::mReferrerPolicy. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294335
2026-04-22 04:12:16 +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 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 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 b5410280f5 Bug 2031200 - Part 3: Sync LoadedScript::mReferrerPolicy and ScriptFetchInfo::mReferrerPolicy. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294335
2026-04-21 15:57:45 +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 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
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 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 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
serge-sans-paille 5507f1c19a Bug 1995522 - Cleanup remaining unused mfbt includes r=emilio,necko-reviewers,media-playback-reviewers,webrtc-reviewers,profiler-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,layout-reviewers,dom-worker-reviewers,emz,mstange,TYLin,alwu,pehrsons,dom-storage-reviewers,valentin,jari,jwatt,hsingh,edenchuang,janv
Those are the remaining parts required before we land the new mhbt
header inclusion linter

Differential Revision: https://phabricator.services.mozilla.com/D270812
2025-11-16 10:27:57 +00:00
Cristina Horotan 17287b2ae8 Revert "Bug 1995522 - Cleanup remaining unused mfbt includes r=emilio,necko-reviewers,media-playback-reviewers,webrtc-reviewers,profiler-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,layout-reviewers,dom-worker-reviewers,emz,mstange,TYLin,alwu,pehrsons,dom-storage-reviewers,valentin,jari,jwatt,hsingh,edenchuang,janv" for causing conflict on reverting Bug 1998267
This reverts commit d0eaaff18d.
2025-11-15 17:02:19 +00:00
serge-sans-paille d0eaaff18d Bug 1995522 - Cleanup remaining unused mfbt includes r=emilio,necko-reviewers,media-playback-reviewers,webrtc-reviewers,profiler-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,layout-reviewers,dom-worker-reviewers,emz,mstange,TYLin,alwu,pehrsons,dom-storage-reviewers,valentin,jari,jwatt,hsingh,edenchuang,janv
Those are the remaining parts required before we land the new mhbt
header inclusion linter

Differential Revision: https://phabricator.services.mozilla.com/D270812
2025-11-14 12:08:52 +00:00
Tooru Fujisawa 38ff092450 Bug 1995985 - Add assertion to avoid using request expiration time for cached case. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D270109
2025-10-29 14:33:10 +00:00
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
serge-sans-paille ed96172399 Bug 1996939 - Remove unused mfbt inclusion in js/** r=spidermonkey-reviewers,mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D270386
2025-10-29 07:57:33 +00:00
serge-sans-paille 880b44ac3d Bug 1996049 - Remove unused inclusion of Atomics.h r=emilio,necko-reviewers,geckoview-reviewers,media-playback-reviewers,webrtc-reviewers,profiler-reviewers,toolkit-telemetry-reviewers,dom-worker-reviewers,mstange,chunmin,pehrsons,m_kato,jesup,asuth
Differential Revision: https://phabricator.services.mozilla.com/D269783
2025-10-26 20:45:57 +00:00
Tooru Fujisawa 0774d2bf09 Bug 1992646 - Use bit field for less-frequently-used bool/enum fields in ScriptLoadRequest. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269525
2025-10-23 04:19:25 +00:00
Tooru Fujisawa 40dcf63aa3 Bug 1991607 - Part 12: Reorder ScriptLoadRequest/ModuleLoadRequest fields. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D267361
2025-10-22 11:21:04 +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
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 30499d5cdc Bug 1991607 - Part 12: Reorder ScriptLoadRequest/ModuleLoadRequest fields. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D267361
2025-10-22 04:38:23 +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