Henri Sivonen
a1732ccb1c
Bug 1938290 - Add a continuation mechanism for the parsers returning early due to there being a current script. r=peterv
...
Differential Revision: https://phabricator.services.mozilla.com/D233329
2025-03-04 17:34:59 +00:00
Tooru Fujisawa
22a5b6727a
Bug 1899090 - Part 3: Stop using JS::DuplicateStencil in ScriptLoader. r=nbp
...
Incremental-encoding API no longer requires exclusive ownership of JS::Stencil,
and the consumers no longer need to duplicate.
Differential Revision: https://phabricator.services.mozilla.com/D230379
2024-12-04 00:54:44 +00:00
Bryan Thrall
3bacfd5034
Bug 1724236 - Rename JSExecutionUtils from JSExecutionContext r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218458
2024-10-30 13:41:47 +00:00
Bryan Thrall
0b84b732ae
Bug 1724236 - Remove JSExecutionContext r=arai
...
I think the constructor assertions don't need to be preserved, since the
locations where JSExecutionContext was constructed are obviously using a real
global on the main thread. I'm less confident in removing the check for
CycleCollectedJSContext::Get()->MicroTaskLevel(), but it should be ok since the
assertion wasn't failing already.
I'm leaving the profiler label "JSExecutionContext" intact for now so there's
no change in recorded profiles, but we should consider a better name for it in
the future.
Differential Revision: https://phabricator.services.mozilla.com/D218457
2024-10-30 13:41:46 +00:00
Bryan Thrall
c04c306a9f
Bug 1724236 - Pass debugger parameters as arguments instead of members r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218454
2024-10-30 13:41:45 +00:00
Bryan Thrall
b9d1574361
Bug 1724236 - Move stencil duplication out of JoinOffThread, Decode, Compile r=arai
...
In InstantiateClassicScriptFromMaybeEncodedSource(), I need to use a local
ErrorResult because calling `aRv.NoteJSContextException(aCx)` must be followed
by an immediate return, but that would avoid adding the compile time to
mMainThreadParseTime.
Differential Revision: https://phabricator.services.mozilla.com/D222301
2024-10-30 13:41:43 +00:00
Bryan Thrall
c9529870d4
Bug 1724236 - Pass script as function argument instead of member r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218446
2024-10-30 13:41:41 +00:00
Bryan Thrall
b6fd76662b
Bug 1724236 - Get CompileOptions from function arguments instead of member r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218442
2024-10-30 13:41:40 +00:00
Bryan Thrall
190d6b921b
Bug 1724236 - Simplify error handling via ErrorResult r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D224548
2024-10-30 13:41:39 +00:00
Tooru Fujisawa
4cdfcf314d
Bug 1915626 - Part 3: Cache HTTP response headers for the JS. r=bthrall
...
Differential Revision: https://phabricator.services.mozilla.com/D223967
2024-10-08 11:38:07 +00:00
Tooru Fujisawa
e0f0fc0ca5
Bug 1916960 - Part 10: Trigger notification for the cached script load. r=bthrall
...
Differential Revision: https://phabricator.services.mozilla.com/D222452
2024-09-24 08:05:54 +00:00
Olli Pettay
a420032817
Bug 1917389, make it less likely to run non-parser-blocking scripts while there is parser blocking script pending, r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D222220
2024-09-17 15:50:34 +00:00
Tooru Fujisawa
3f46be92f0
Bug 1896709 - Part 13: Use SharedSubResourceCache in ScriptLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215882
2024-07-18 21:58:14 +00:00
Tooru Fujisawa
85f4805168
Bug 1896709 - Part 12: Add SharedScriptCache field to ScriptLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215881
2024-07-18 21:58:14 +00:00
Tooru Fujisawa
6924910f83
Bug 1896709 - Part 10: Add SharedScriptCache. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215879
2024-07-18 21:58:13 +00:00
Tooru Fujisawa
16292d50d1
Bug 1896709 - Part 4: Accumulate cache expiration time in script load. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215873
2024-07-18 21:58:11 +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
309452cddc
Bug 1896709 - Part 13: Use SharedSubResourceCache in ScriptLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215882
2024-07-18 09:15:28 +00:00
Tooru Fujisawa
de3ba3568c
Bug 1896709 - Part 12: Add SharedScriptCache field to ScriptLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215881
2024-07-18 09:15:28 +00:00
Tooru Fujisawa
2fd3dec9e1
Bug 1896709 - Part 10: Add SharedScriptCache. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215879
2024-07-18 09:15:27 +00:00
Tooru Fujisawa
99e7436687
Bug 1896709 - Part 4: Accumulate cache expiration time in script load. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D215873
2024-07-18 09:15:24 +00:00
Tooru Fujisawa
6e5b7d5d1b
Bug 1898677 - Cache the result of bytecode encoding condition. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D211517
2024-05-27 06:31:16 +00:00
Nicolas B. Pierron
ed93bacb41
Bug 1800896 - Move padding of the bytecode vector into SaveSRIHash. r=arai
...
When saving the SRI Hash, we resize the btyecode buffer to the expected size of
the buffer. Previously, after saving the bytecode, the code surrounding
SaveSRIHash introduced the padding necessary for potentially saving bytecode
after.
This patch move the padding into SaveSRIHash, to reduce the overhead of
understanding why the btyecode buffer is being manipulated in what seems to be
out-of-context. Moving it into SaveSRIHash might seems strange but it closer to
other actions to the bytecode buffer which makes it less unexpected.
Differential Revision: https://phabricator.services.mozilla.com/D203131
2024-03-18 14:26:57 +00:00
Tom Schuster
694c3e8534
Bug 1872839 - Remove aMimeTypeGuess parameter from nsIContentPolicy. r=freddyb
...
Differential Revision: https://phabricator.services.mozilla.com/D197794
2024-01-08 15:47:42 +00:00
Henri Sivonen
5d0c7d7cd6
Bug 1846178 - Use the async/defer (non-blocking) HTML parser code path for module scripts. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D185797
2023-09-15 07:53:16 +00:00
Mirko Brodesser
c25f6318b9
Bug 1839316: part 11) Factor preparing the incremental stream loader out of StartLoadInternal. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D187181
2023-09-05 12:07:20 +00:00
Mirko Brodesser
4cd052ee9c
Bug 1839316: part 10) Factor preparing the HTTP request and initiator type out of StartLoadInternal. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D187177
2023-09-05 12:07:20 +00:00
Mirko Brodesser
b58e665bd8
Bug 1839316: part 9) Factor preparing request priority and request dependencies out of StartLoadInternal. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D187176
2023-09-05 12:07:20 +00:00
Mirko Brodesser
06201cd612
Bug 1839316: part 8) Factor details of preparing load info and preparing the cache info out of ScriptLoader::StartLoadInternal. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D187175
2023-09-04 09:05:10 +00:00
Mirko Brodesser
b5584ca4d5
Bug 1839316: part 6) Correct documentation of ScriptLoader::StartLoadInternal. r=kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D187025
2023-08-30 07:42:40 +00:00
Tooru Fujisawa
699ea246fc
Bug 1845668 - Part 1: Rewrite OffThreadCompilationCompleteRunnable based on Task. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D184898
2023-08-29 12:07:18 +00:00
Tooru Fujisawa
c457938e8c
Bug 1845638 - Part 1: Use JS::FrontendContext APIs and TaskController in compilation and decode in ScriptLoader. r=smaug,bthrall
...
Differential Revision: https://phabricator.services.mozilla.com/D184896
2023-08-29 12:07:18 +00:00
Mirko Brodesser
3de23172d3
Bug 1839316: part 4) Add RequestPriority to ScriptFetchOptions and ScriptLoadRequest. r=smaug
...
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.
Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-28 11:56:34 +00:00
Norisz Fay
98abe042d7
Backed out changeset 4a4d5e64aec5 (bug 1846178) for causing mochitest failures on test_script_loader_js_cache.html/cache_module.html CLOSED TREE
2023-08-23 11:19:39 +03:00
Henri Sivonen
f77548b084
Bug 1846178 - Use the async/defer (non-blocking) HTML parser code path for module scripts. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D185797
2023-08-23 07:11:47 +00:00
Cosmin Sabou
70b514ed8e
Backed out 5 changesets (bug 1839316) for causing bustages on ScriptLoader.cpp. CLOSED TREE
...
Backed out changeset 85f107e082ee (bug 1839316)
Backed out changeset 8c1e22518c3a (bug 1839316)
Backed out changeset a4c3dec0f34c (bug 1839316)
Backed out changeset 313ff15742dd (bug 1839316)
Backed out changeset fa200e26bbb1 (bug 1839316)
2023-08-09 20:16:06 +03:00
Mirko Brodesser
fcb70e3246
Bug 1839316: part 4) Add RequestPriority to ScriptFetchOptions and ScriptLoadRequest. r=smaug
...
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.
Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-09 13:50:28 +00:00
Cosmin Sabou
1ea8eb8868
Backed out 5 changesets (bug 1839316) for causing leaks. CLOSED TREE
...
Backed out changeset 75edff380fee (bug 1839316)
Backed out changeset 6a622fd5cd91 (bug 1839316)
Backed out changeset 60908cc7c586 (bug 1839316)
Backed out changeset 7b9dd8875a9e (bug 1839316)
Backed out changeset b586915187c2 (bug 1839316)
2023-08-07 16:43:03 +03:00
Mirko Brodesser
e0b84f81a4
Bug 1839316: part 4) Add RequestPriority to ScriptFetchOptions and ScriptLoadRequest. r=smaug
...
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.
Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-07 11:46:19 +00:00
Tom Schuster
3b71c37528
Bug 1843066 - Provide the nonce for speculative <script> preloads. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D183390
2023-07-21 17:28:02 +00:00
Tom Schuster
91477557ae
Bug 1843002 - Add parser-metadata to ScriptFetchOptions. r=allstarschh,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D183366
2023-07-21 17:28:02 +00:00
Tom Schuster
bcfda085d6
Bug 1843002 - Add nonce to ScriptFetchOptions. r=allstarschh,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D183365
2023-07-21 17:28:02 +00:00
Stanca Serban
b42c5eaa6a
Backed out 6 changesets (bug 1313937, bug 1843066, bug 1843002) for causing build bustages in ScriptLoadRequest.h. CLOSED TREE
...
Backed out changeset 84c2d1c04aa2 (bug 1313937)
Backed out changeset 7cab9a1ea25f (bug 1313937)
Backed out changeset affc7d1f130d (bug 1313937)
Backed out changeset e13aacfe7944 (bug 1843066)
Backed out changeset 21a9bee8f772 (bug 1843002)
Backed out changeset d381b6365111 (bug 1843002)
2023-07-21 17:41:04 +03:00
Tom Schuster
d75e8cbac4
Bug 1843066 - Provide the nonce for speculative <script> preloads. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D183390
2023-07-21 12:31:23 +00:00
Tom Schuster
320e8d0d9d
Bug 1843002 - Add parser-metadata to ScriptFetchOptions. r=allstarschh,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D183366
2023-07-21 12:31:23 +00:00
Tom Schuster
91054529c2
Bug 1843002 - Add nonce to ScriptFetchOptions. r=allstarschh,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D183365
2023-07-21 12:31:22 +00:00
Tooru Fujisawa
36f68ec1e5
Bug 1837964 - Part 2: Use UniquePtr with explicit free policy in ScriptLoader::{ConvertToUTF16,ConvertToUTF8} and their consumers. r=smaug
...
Remove raw pointer variant of ScriptLoader::{ConvertToUTF16,ConvertToUTF8} to
make it clearer how the buffer is allocated and how it should be freed.
The consumer in ServiceWorkerScriptCache expects the buffer allocated with
malloc, but given js_malloc and malloc are identical in browser, it also
uses JS::FreePolicy.
Differential Revision: https://phabricator.services.mozilla.com/D181204
2023-07-06 09:37:18 +00:00
Em Zhan
5959006756
Bug 1798319 - Implement modulepreload in early hints r=manuel,smaug,necko-reviewers,kershaw
...
The aEarlyHintPreloaderId parameter for StartLoad/StartLoadInternal is changed
to be a member variable of ScriptLoadRequest instead so that an initiator type
of early hints can be set for module requests. Before, ModuleLoader would always
pass in a zero value for the id since ModuleLoaderBase has no concept of early
hints when it calls StartFetch.
As a prerequisite for early hints support, this commit also implements
modulepreload in link headers (Bug 1773056).
Differential Revision: https://phabricator.services.mozilla.com/D180020
2023-06-26 10:49:53 +00:00
Adam Vandolder
bec905b437
Bug 1827512 - Properly handle type and src attribute changes on script tags. r=smaug
...
Modifies the preparation of script tags in order to better follow the
specification. Now, scripts are only considered to have already started
if they have a valid type when being prepared, and only changes to the
src attribute trigger script preparation, instead of for all attributes.
This allows script tags to be re-run after their type and src are
modified, if they haven't run already.
Differential Revision: https://phabricator.services.mozilla.com/D175795
2023-06-14 04:00:09 +00:00
Sean Feng
f5713606fe
Bug 1804086 - Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw
...
This is needed for doing content decoding for ORB.
Differential Revision: https://phabricator.services.mozilla.com/D172490
2023-03-22 14:21:39 +00:00