27 Commits
Author SHA1 Message Date
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
Tooru Fujisawa ce0999c751 Bug 2028715 - Do not check the fetch priority when sharing response. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D291656
2026-04-02 11:47:34 +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 4440b61f19 Bug 2019880 - Part 1: Do not put nonce in the ScriptHashKey. r=nbp,devtools-reviewers,jdescottes
Also modified the ChromeUtils.getCachedJavaScriptSource not to receive the
nonce parameter, and updated the consumers.

Differential Revision: https://phabricator.services.mozilla.com/D285204
2026-03-02 12:25:04 +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 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 252144864c Bug 2002770 - Part 1: Reorder the ScriptFetchOptions fields by size. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D274286
2025-11-27 14:07:57 +00:00
Yoshi Cheng-Hao Huang 630abc20e1 Bug 1968895 - Part 5: Add CreateDefaultScriptFetchOptions and GetClientReferrerURI. r=jonco
Provide virtual interfaces to be overriden by the environment.

Differential Revision: https://phabricator.services.mozilla.com/D263374
2025-09-07 09:03:51 +00:00
Cristina Horotan 1fe1c12f6e Revert "Bug 1968895: apply code formatting via Lando" for causing SM failures on Value.h
This reverts commit 40010a7da7.

Revert "Bug 1968895 - Part 7: Remove StartFetchingModuleAndDependencies. r=jonco"

This reverts commit 816a0a6015.

Revert "Bug 1968895 - Part 6: Replace CreateStaticImport/CreateDynamicImport with CreateRequest. r=jonco"

This reverts commit e29a957535.

Revert "Bug 1968895 - Part 5: Add CreateDefaultScriptFetchOptions and GetClientReferrerURI. r=jonco"

This reverts commit 4b21d41ec1.

Revert "Bug 1968895 - Part 4: Pass null for referrer in shadow realm import value. r=jonco"

This reverts commit a3417dbe89.

Revert "Bug 1968895 - Part 3: Update ModuleLoadRequest's referrer policy for workers. r=jonco"

This reverts commit 6a28639be8.

Revert "Bug 1968895 - Part 2: Pass BaseURL for static/dynamic import. r=jonco"

This reverts commit dab430a7b4.

Revert "Bug 1968895 - Part 1: Check if dynamic import is supported earlier. r=jonco"

This reverts commit 34f67fd697.
2025-09-03 18:44:42 +00:00
Yoshi Cheng-Hao Huang 4b21d41ec1 Bug 1968895 - Part 5: Add CreateDefaultScriptFetchOptions and GetClientReferrerURI. r=jonco
Provide virtual interfaces to be overriden by the environment.

Differential Revision: https://phabricator.services.mozilla.com/D263374
2025-09-03 17:58:49 +00:00
Tooru Fujisawa eae715d121 Bug 1954644 - Part 5: Make ScriptFetchOptions::IsCompatible more robust against various situations. r=nbp
mTriggeringPrincipal can be nullptr in chrome-privileged context.
And also the `other` can be `this` value itself.

Differential Revision: https://phabricator.services.mozilla.com/D242310
2025-03-22 04:03:55 +00:00
Tooru Fujisawa dd9a53aa0d Bug 1896709 - Part 9: Add ScriptLoadRequest::CacheEntryFound. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D215878
2024-07-18 21:58:13 +00:00
Norisz Fay 471367226c Backed out 17 changesets (bug 1896709) for causing build bustage and mochitest failures CLOSED TREE
Backed out changeset 046f0f522ce7 (bug 1896709)
Backed out changeset 0271e50308e6 (bug 1896709)
Backed out changeset 26fac760de19 (bug 1896709)
Backed out changeset 6fa3424dfc40 (bug 1896709)
Backed out changeset b7bcb9904435 (bug 1896709)
Backed out changeset c6878c5fdde4 (bug 1896709)
Backed out changeset 8ca8a4082e44 (bug 1896709)
Backed out changeset 20ff83806cc6 (bug 1896709)
Backed out changeset 6c9338852a19 (bug 1896709)
Backed out changeset e8615b5d82ab (bug 1896709)
Backed out changeset 842f2047a4bd (bug 1896709)
Backed out changeset 54eea04a7342 (bug 1896709)
Backed out changeset 220b544127cb (bug 1896709)
Backed out changeset 52ce0ebfb29a (bug 1896709)
Backed out changeset 34fc79dc1ad7 (bug 1896709)
Backed out changeset 50b0f6a23e3c (bug 1896709)
Backed out changeset 89c4c6bb465a (bug 1896709)
2024-07-18 14:48:46 +03:00
Tooru Fujisawa 2d77dfea62 Bug 1896709 - Part 9: Add ScriptLoadRequest::CacheEntryFound. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D215878
2024-07-18 09:15:26 +00:00
Tooru Fujisawa 599af2d7d2 Bug 1899172 - Part 11: Move nsIScriptElement from ScriptFetchOptions to ScriptLoadContext. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D211912
2024-05-30 05:01:18 +00:00
Tooru Fujisawa cac32b6d4d Bug 1800641 - Part 1: Move ScriptFetchOptions into its own file. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D197839
2024-01-08 14:57:36 +00:00
Noemi Erli 46e817bca8 Backed out changeset 4d6294424819 (bug 1800641) for causing Bug 1872347 2023-12-29 16:23:18 +02:00
Nicolas B. Pierron 7ad7f045d4 Bug 1800641 - Move some ScriptLoadRequest fields into LoadedScript. r=yulia
We are looking into caching loaded script in memory. To do so we need something
to cache.

At the moment, the `ScriptLoadRequest` structure hold all the fields which are
loaded, and used before executing JavaScript code. Then, the `ScriptLoadRequest`
is not guaranteed to out-live the first execution.

Therefore, we have to move fields out of the `ScriptLoadRequest` such that they
can later be used by any caching mechanism. The `LoadedScript` is the closest
existing structure which exists which fit the description.

This patch moves fields out of the ScriptLoadRequest into the `LoadedScript`,
which already has a `LoadedScript` field.

The `LoadedScript` field is initialized sooner, when the `ScriptLoadRequest` is
created, to be subsituted later by a real cache implementation. At the moment
the function `ScriptLoadRequest::NoCacheEntryFound` is used as a placeholder to
change the state of the `ScriptLoadRequest` from `CheckingCache` to `Fetching`.
Existing initializations are replaced by assertions to fail in debug build if
the current patch does not reproduce the expected state properly.

The `LoadedScript` get fields such as the source text, the text length, the
bytecode buffer (which also contains SRI), and the offset at which the bytecode
starts within the bytecode buffer. As these fields are no longer reachable by
name, multiple accessors are added to work-around the issue. Using this as an
opportunity to add extra assertions as part of these accessors.

A new class named `LoadedScriptDelegate` is added to re-add, by inheritance, all
the accessors which used to be part of `ScriptLoadRequest` as methods which are
delegating to the field which is holding the `LoadedScript`. This class is using
templates to avoid virtual inheritance which might hinder inlining, especially
since `ScriptLoadRequest` cannot be made final, as `ModuleLoadRequest` extends
it.

The `ScriptFetchOptions` structure is moved to its own file to solve C++ include
issues.

Differential Revision: https://phabricator.services.mozilla.com/D163615
2023-12-25 09:46:54 +00:00
Cosmin Sabou 78d82c8098 Backed out changeset f69f493b2f3c (bug 1800641) for causing non-unified build bustages on LoadedScript.cpp. CLOSED TREE 2023-12-25 08:38:51 +02:00
Nicolas B. Pierron d60b4bd3b1 Bug 1800641 - Move some ScriptLoadRequest fields into LoadedScript. r=yulia
We are looking into caching loaded script in memory. To do so we need something
to cache.

At the moment, the `ScriptLoadRequest` structure hold all the fields which are
loaded, and used before executing JavaScript code. Then, the `ScriptLoadRequest`
is not guaranteed to out-live the first execution.

Therefore, we have to move fields out of the `ScriptLoadRequest` such that they
can later be used by any caching mechanism. The `LoadedScript` is the closest
existing structure which exists which fit the description.

This patch moves fields out of the ScriptLoadRequest into the `LoadedScript`,
which already has a `LoadedScript` field.

The `LoadedScript` field is initialized sooner, when the `ScriptLoadRequest` is
created, to be subsituted later by a real cache implementation. At the moment
the function `ScriptLoadRequest::NoCacheEntryFound` is used as a placeholder to
change the state of the `ScriptLoadRequest` from `CheckingCache` to `Fetching`.
Existing initializations are replaced by assertions to fail in debug build if
the current patch does not reproduce the expected state properly.

The `LoadedScript` get fields such as the source text, the text length, the
bytecode buffer (which also contains SRI), and the offset at which the bytecode
starts within the bytecode buffer. As these fields are no longer reachable by
name, multiple accessors are added to work-around the issue. Using this as an
opportunity to add extra assertions as part of these accessors.

A new class named `LoadedScriptDelegate` is added to re-add, by inheritance, all
the accessors which used to be part of `ScriptLoadRequest` as methods which are
delegating to the field which is holding the `LoadedScript`. This class is using
templates to avoid virtual inheritance which might hinder inlining, especially
since `ScriptLoadRequest` cannot be made final, as `ModuleLoadRequest` extends
it.

The `ScriptFetchOptions` structure is moved to its own file to solve C++ include
issues.

Differential Revision: https://phabricator.services.mozilla.com/D163615
2023-12-25 05:50:53 +00:00