Sylvestre Ledru
b0fe72dee5
Bug 1856795 - Remove redundant member init r=emilio
...
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .
https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html
Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
7388749830
Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
...
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
4a97019e39
Bug 1856795 - Remove redundant member init r=emilio
...
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .
https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html
Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Emilio Cobos Álvarez
d02e297b2d
Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
...
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.
I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).
Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Yoshi Cheng-Hao Huang
0060499938
Bug 1841859 - Part 2: Parse the referrer policy from http header and update the referrer policy. r=jonco,smaug
...
This implementes the following requirement from the spec:
https://html.spec.whatwg.org/#fetch-a-single-module-script
12. In both cases, let processResponseConsumeBody given response response and null, failure, or a byte sequence bodyBytes be the following algorithm:
5. Let referrerPolicy be the result of parsing the `Referrer-Policy` header given response.
6. If referrerPolicy is not the empty string, set options's referrer policy to referrerPolicy.
Differential Revision: https://phabricator.services.mozilla.com/D186944
2023-09-20 17:32:15 +00:00
Yoshi Cheng-Hao Huang
2b03ca80a7
Bug 1841859 - Part 1: Move ReferrerPolicy to ScriptLoadRequest and LoadedScript. r=jonco,smaug
...
Suggested by jonco during review,
https://phabricator.services.mozilla.com/D186944#inline-1036982
Differential Revision: https://phabricator.services.mozilla.com/D187385
2023-09-20 17:32:15 +00:00
Mirko Brodesser
742a4a9b51
Bug 1839316: part 12) Adjust nsISupportsPriority's value to fetch priority in ScriptLoader. r=valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D187438
2023-09-19 13:13:27 +00:00
Tooru Fujisawa
9003f6d2cb
Bug 1853480 - Part 1: Use TaskController thread stack size as JS stack quota in ScriptLoader off-thread compilation. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D188556
2023-09-19 11:12:52 +00:00
Narcis Beleuzu
0da49ed298
Backed out 4 changesets (bug 1853480) for bustages on ScriptPreloader.cpp . CLOSED TREE
...
Backed out changeset 153828203749 (bug 1853480)
Backed out changeset f686d2dccfd6 (bug 1853480)
Backed out changeset 975251abd222 (bug 1853480)
Backed out changeset d29bfc33c3e8 (bug 1853480)
2023-09-19 13:44:52 +03:00
Tooru Fujisawa
4ecca8b76d
Bug 1853480 - Part 1: Use TaskController thread stack size as JS stack quota in ScriptLoader off-thread compilation. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D188556
2023-09-19 09:46:25 +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
Tooru Fujisawa
d2ffe31339
Bug 1846194 - Remove off-thread compilation and decode API. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D185125
2023-09-01 03:43:21 +00:00
Mirko Brodesser
fbfd22b9a3
Bug 1850713: remove duplicated setting of early hint preloader id in ScriptLoader::StartLoadInternal. r=kershaw,manuel
...
Happens already at
<https://searchfox.org/mozilla-central/rev/e7b8d13b7513b6fbd97d69e882d7faeed05309d0/dom/script/ScriptLoader.cpp#620-628 >.
Differential Revision: https://phabricator.services.mozilla.com/D187105
2023-08-30 14:58:21 +00:00
Mirko Brodesser
c87598910b
Bug 1839316: part 7) Factor creating channel for script loading out of ScriptLoader::StartLoadInternal. r=kershaw
...
Abstracts details away. Simplifies extending `StartLoadInternal`.
Differential Revision: https://phabricator.services.mozilla.com/D187093
2023-08-30 10:33:40 +00:00
Tooru Fujisawa
092aa3e751
Bug 1845668 - Part 2: Move OffThreadCompilationCompleteTask::Run into class definition. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D184899
2023-08-29 12:07:18 +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
c34d22afe2
Bug 1845638 - Part 2: Include the pending time of OffThreadCompilationCompleteRunnable to the profiler timing. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D184897
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
Tooru Fujisawa
1c1f4d9c1a
Bug 1847469 - Part 26: Use column number types in JS::CompileOptions. r=iain
...
Differential Revision: https://phabricator.services.mozilla.com/D185764
2023-08-16 17:31:42 +00:00
Cristian Tuns
77d753c741
Backed out 27 changesets (bug 1847469) for causing spidermonkey bustages in Script.cpp CLOSED TREE
...
Backed out changeset 9d6e2651a013 (bug 1847469)
Backed out changeset 9b72d668efd2 (bug 1847469)
Backed out changeset 86abf5cf0a22 (bug 1847469)
Backed out changeset 46833087f8ac (bug 1847469)
Backed out changeset f3e2207fdeec (bug 1847469)
Backed out changeset aed75776cfff (bug 1847469)
Backed out changeset 8292a38bd99f (bug 1847469)
Backed out changeset 1320f83fb8c7 (bug 1847469)
Backed out changeset df9f925f9837 (bug 1847469)
Backed out changeset 69f32cf1862a (bug 1847469)
Backed out changeset b2ddddec8818 (bug 1847469)
Backed out changeset 056eed7abc97 (bug 1847469)
Backed out changeset 5df4f43ac0bf (bug 1847469)
Backed out changeset cb57923f6532 (bug 1847469)
Backed out changeset a0993f2a2195 (bug 1847469)
Backed out changeset 782499fbedf2 (bug 1847469)
Backed out changeset cf84fb98c5e1 (bug 1847469)
Backed out changeset 1fa5ab59814b (bug 1847469)
Backed out changeset f5f78944df81 (bug 1847469)
Backed out changeset aa14337bf5c6 (bug 1847469)
Backed out changeset 6757db4575d7 (bug 1847469)
Backed out changeset 236ff135701e (bug 1847469)
Backed out changeset 9b4d5b435020 (bug 1847469)
Backed out changeset a0f789621bc8 (bug 1847469)
Backed out changeset c19b81f48055 (bug 1847469)
Backed out changeset b4521e546d7e (bug 1847469)
Backed out changeset f26a10289316 (bug 1847469)
2023-08-16 07:08:01 -04:00
Tooru Fujisawa
61148c67b2
Bug 1847469 - Part 26: Use column number types in JS::CompileOptions. r=iain
...
Differential Revision: https://phabricator.services.mozilla.com/D185764
2023-08-16 10:26:34 +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
Jon Coppeard
bee296d117
Bug 1843838 - Rename ScriptLoadRequest::IsReadyToRun to IsFinished since this returns true for cancelled requests r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D183740
2023-08-04 09:40:40 +00:00
Peter Van der Beken
5dc8782829
Bug 1846277 - Untangle nsGlobalWindow*.h includes. r=dom-core,media-playback-reviewers,sessionstore-reviewers,padenot,farre
...
Differential Revision: https://phabricator.services.mozilla.com/D184978
2023-08-02 20:41:49 +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
Gregory Pappas
9fdac45e54
Bug 1844493 - Remove dom.moduleScripts.enabled pref r=smaug,jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D184072
2023-07-20 10:03:46 +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
Yoshi Cheng-Hao Huang
7b24ef1bf5
Bug 1803984 - Part 5: Check IsModuleFetched() before removing it. r=jonco
...
The crash of https://bugzilla.mozilla.org/show_bug.cgi?id=1835468 can be
reproduced by HTTP redirect in mochitest-plain.
When the script is being processed, sometimes the preloaded request is
still being loaded (for example, the script is being redirected to
another place). So we use the IsModulleFetched() check before calling
RemoveFetchedModule.
Differential Revision: https://phabricator.services.mozilla.com/D182271
2023-06-28 08:43:43 +00:00
Yoshi Cheng-Hao Huang
bfd39f3416
Bug 1803984 - Part 1: Don't use the preloaded module request if there's an import map. r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D178298
2023-06-28 08:43:42 +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
Emilio Cobos Álvarez
529c9ee321
Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
...
We have more readable and faster versions (that just omit the namespace
arg).
Mostly done via sed, with a couple helpers to use the faster lookups
where possible.
Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +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
Jon Coppeard
5c50b911ed
Bug 1835886 - Cancel outstanding load requests when a document is detached from a global r=smaug
...
Also cancel module load requests when cancelling requests generally.
What was happening here was that a previous load was completing and calling
into the wrong module loader, because the loader to use is determined via the
current global, and this was now associated with a different document / script
loader / module loader.
Differential Revision: https://phabricator.services.mozilla.com/D179787
2023-06-13 08:46:26 +00:00
Tom Schuster
e23d4b4e78
Bug 1409200 - Add integrityMetadata to nsILoadInfo. r=freddyb,necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D179822
2023-06-09 18:39:59 +00:00