Adam Vandolder
76a867fb4d
Bug 1978237 - Check for null before attempting to get document URI when ScriptLoader is reporting to the console. r=dom-core,smaug a=pascalc DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D258259
2025-10-28 22:36:43 +00:00
Yoshi Cheng-Hao Huang
2925957e93
Bug 1958495: Add CancelFetchingModules for BETA. a=RyanVM
...
Apply the fix in https://phabricator.services.mozilla.com/D257677 to
BETA.
Original Revision: https://phabricator.services.mozilla.com/D260293
Differential Revision: https://phabricator.services.mozilla.com/D260572
2025-08-09 22:05:01 +00:00
Tooru Fujisawa
59706292b9
Bug 1969895 - Do not try encoding JSON modules. a=RyanVM
...
Original Revision: https://phabricator.services.mozilla.com/D252181
Differential Revision: https://phabricator.services.mozilla.com/D252260
2025-06-03 03:15:07 +00:00
Tom Schuster
3f48655456
Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 15:21:52 +00:00
Serban Stanca
071240c3d9
Revert "Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw" for causing multiple failures.
...
This reverts commit b9a9491a35 .
2025-05-21 13:34:54 +00:00
Tom Schuster
b9a9491a35
Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 12:24:10 +00:00
Florian Quèze
6147d3f360
Bug 1956726 - Migrate histograms to use Glean APIs in dom/, r=chutten.
...
Differential Revision: https://phabricator.services.mozilla.com/D244177
2025-04-03 21:02:54 +00:00
Tooru Fujisawa
c882062351
Bug 1949932 - Part 1: Use SharedScriptCache from ModuleLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242728
2025-04-01 13:09:04 +00:00
Stanca Serban
3d34fe1048
Backed out 8 changesets (bug 1949932) for causing reftests failures in LoadedScript.h. CLOSED TREE
...
Backed out changeset de39fd08733d (bug 1949932)
Backed out changeset b75281f1b27c (bug 1949932)
Backed out changeset 8920e6d4cf8c (bug 1949932)
Backed out changeset c05f9bf802ae (bug 1949932)
Backed out changeset 2c9718bfd7be (bug 1949932)
Backed out changeset 03f4514cfba8 (bug 1949932)
Backed out changeset 9fe4fd6ee6e8 (bug 1949932)
Backed out changeset 1cebf102e64e (bug 1949932)
2025-04-01 08:59:51 +03:00
Tooru Fujisawa
872eb028b0
Bug 1949932 - Part 1: Use SharedScriptCache from ModuleLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242728
2025-04-01 03:11:18 +00:00
Goloman Adrian
62c97b0b6c
Backed out 8 changesets (bug 1949932) for causing build bustages @RootingAPI.h. CLOSED TREE
...
Backed out changeset 181cde5d267e (bug 1949932)
Backed out changeset 44fd656c40de (bug 1949932)
Backed out changeset b4d93df0edb1 (bug 1949932)
Backed out changeset 7c20db67f688 (bug 1949932)
Backed out changeset ac742d9dc3aa (bug 1949932)
Backed out changeset 102e0dc46dff (bug 1949932)
Backed out changeset 80d1b3331844 (bug 1949932)
Backed out changeset cc1834c3ea2a (bug 1949932)
2025-04-01 07:09:29 +03:00
Tooru Fujisawa
85a3b6e05a
Bug 1949932 - Part 1: Use SharedScriptCache from ModuleLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242728
2025-04-01 03:11:18 +00:00
Edgar Chen
82d780e44e
Bug 1954685 - Unship onafterscriptexecute and onbeforescriptexecute events on Nightly; r=dom-core,webidl,saschanaz,devtools-reviewers,ochameau,hsivonen,jandem
...
Differential Revision: https://phabricator.services.mozilla.com/D241940
2025-03-31 19:10:02 +00:00
DavidJCobb
6022e96f95
Bug 1956163 - ScriptLoader now reports child module load failures as coming from the parent module. r=arai
...
When a child module fails to load, the parent module that requested it is now used as the source location for the error message.
Differential Revision: https://phabricator.services.mozilla.com/D242884
2025-03-26 10:20:14 +00:00
Tooru Fujisawa
ef5d576f1d
Bug 1954641 - Part 2: Do not cache inline scripts. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242317
2025-03-22 11:54:13 +00:00
Tooru Fujisawa
e2f9d5b67b
Bug 1954641 - Part 1: Do not use SharedScriptCache in system principal. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242316
2025-03-22 11:54:12 +00:00
Tooru Fujisawa
fef3339c5e
Bug 1954644 - Part 10: Move the EmulateNetworkEvents call to StartClassicLoad. r=nbp
...
Given that modules become singleton per each global, and they're not always
fetched, network events should be emulated only when the module is confirmed
not to be stored in the module map.
The EmulateNetworkEvents callside should be more tightly coupled with the actual
StartLoadInternal call.
Differential Revision: https://phabricator.services.mozilla.com/D242315
2025-03-22 04:03:56 +00:00
Tooru Fujisawa
3a0e4f5b62
Bug 1954644 - Part 8: Move cache insertion logic into ScriptLoader::TryCacheRequest and ScriptLoader::GetCacheBehavior. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242313
2025-03-22 04:03:55 +00:00
Tooru Fujisawa
7aaa05d10e
Bug 1954644 - Part 7: Move cache lookup and consumption logic into ScriptLoader::TryUseCache and ScriptLoader::EmulateNetworkEvents. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242312
2025-03-22 04:03:55 +00:00
Tooru Fujisawa
457e7a1f83
Bug 1954644 - Part 6: Move ScriptLoadRequestType to its own file. r=nbp
...
ModuleLoader will also use it.
Differential Revision: https://phabricator.services.mozilla.com/D242311
2025-03-22 04:03:55 +00:00
Tooru Fujisawa
7d581d7571
Bug 1954644 - Part 2: Fix parameter/variable names. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D242307
2025-03-22 04:03:54 +00:00
Fatih Kilic
37486aeb74
Bug 1945540: Part 3 - Get integrity from import map. r=tschuster,jonco,dom-core,mccr8
...
Differential Revision: https://phabricator.services.mozilla.com/D236559
2025-03-06 14:16:30 +00:00
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
Emilio Cobos Álvarez
db9bcd53f7
Bug 1948889 - Simplify SRICheck by getting location from http referrer info. r=freddyb,tschuster
...
The referrer info is more directly what we want (what triggered this
load).
I could add this information for non-http channels, but I think it's
probably not worth it. This is useful because it's thread-safe, which
allows me to support off-main-thread parsing of stylesheets that contain
SRI metadata.
It also simplifies the API and avoids getting URIs around in non-error
code paths.
Differential Revision: https://phabricator.services.mozilla.com/D238612
2025-02-25 09:38:28 +00:00
Tooru Fujisawa
3e937c72fd
Bug 1902953 - Use the SharedScriptCache in script preload. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D238371
2025-02-20 12:10:52 +00:00
Tooru Fujisawa
af1768891a
Bug 1947063 - Part 2: Evict cache when non-cacheable content is received. r=nbp,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D237561
2025-02-14 15:10:35 +00:00
Yoshi Cheng-Hao Huang
1b50922475
Bug 1933239 - Update HTTP Accept header when fetching a JSON module. r=dom-core,necko-reviewers,frontend-codestyle-reviewers,mossop,valentin,sefeng
...
According to https://fetch.spec.whatwg.org/#fetching
If the request's destination is "json", the Accept value in HTTP header
should be set to `application/json,*/*;q=0.5`.
Differential Revision: https://phabricator.services.mozilla.com/D235837
2025-02-10 14:18:48 +00:00
Tooru Fujisawa
af77f5495d
Bug 1945994 - Explicitly block the load event until the cached script is executed. r=nbp,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D236980
2025-02-06 14:05:03 +00:00
Tooru Fujisawa
ec1f5b8445
Bug 1945411 - Part 3: Do not cache stencil with asm.js. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D236496
2025-02-03 14:34:54 +00:00
Florian Quèze
9609e47f62
Bug 1879329 - script generated replacement of the GleanMetrics.h includes, r=chutten,valentin,media-playback-reviewers,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,rkraesig,emz,aabh,padenot.
...
Differential Revision: https://phabricator.services.mozilla.com/D234744
2025-01-21 11:21:45 +00:00
Vincent Hilla
adccdd89ca
Bug 1840932 - Have ScriptLoader not block load twice on document.open. r=smaug
...
If a document is still processing a stylesheet while document.open occurs,
the defer checkpoint might not have been reached. This causes the
ScriptLoader to block load twice, although it will only unblock once.
Related: Bug 1568171
Differential Revision: https://phabricator.services.mozilla.com/D233156
2025-01-06 13:18:10 +00:00
Jonatan Klemets
bef1efa9e2
Bug 1858078 - Part 2: Return correct nsIContentPolicy when fetching json modules r=spidermonkey-reviewers,dom-core,hsivonen,allstarschh
...
Differential Revision: https://phabricator.services.mozilla.com/D229525
2024-12-12 17:39:18 +00:00
Tooru Fujisawa
d0e537de50
Bug 1899090 - Part 9: Rename *IncrementalEncoding public API to *CollectDelazifications. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D230385
2024-12-04 00:54:46 +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
Tooru Fujisawa
c1b8d7b50e
Bug 1899090 - Part 2: Rebuild the incremental encoding with InitialStencilAndDelazifications. r=nbp
...
Create InitialStencilAndDelazifications and associate it to ScriptSourceObject,
and store on-demand delazifications into the InitialStencilAndDelazifications.
InitialStencilAndDelazifications is merged into single CompilationStencil when
finishing, but the JS::Stencil-based API is going to be rewritten later not
to merge.
Differential Revision: https://phabricator.services.mozilla.com/D230378
2024-12-04 00:54:44 +00:00
Bryan Thrall
5304755464
Bug 1929227 - Restore bytecode handling r=mgaudet
...
It was accidentally removed in 7b334fe58713.
Differential Revision: https://phabricator.services.mozilla.com/D228190
2024-11-06 16:06:39 +00:00
Bryan Thrall
e26f923c8e
Bug 1724236 - Move InstantiateStencil() to ScriptLoader r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D222299
2024-10-30 13:41:48 +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
34372a7a97
Bug 1724236 - Inline JoinOffThread r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218456
2024-10-30 13:41:46 +00:00
Bryan Thrall
a85ba25a1c
Bug 1724236 - Move JoinOffThread and InstantiateStencil out of JSExecutionContext r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218455
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
dd1514b033
Bug 1724236 - Move Decode to ScriptLoader r=arai
...
ScriptLoader is the only place that calls it, and inlining it made the call
site too hard to follow.
Differential Revision: https://phabricator.services.mozilla.com/D218453
2024-10-30 13:41:45 +00:00
Bryan Thrall
6f37de74e2
Bug 1724236 - Inline Compile(JS::SourceText) r=arai
...
The remaining Compile(nsAString) could be inlined as well, but it is only used
in nsJSThunk::EvaluateScript and WindowScriptTimeoutHandler::Call. Right now,
I'm just focusing on use by ScriptLoader.
Differential Revision: https://phabricator.services.mozilla.com/D218452
2024-10-30 13:41:44 +00:00
Bryan Thrall
8e00518582
Bug 1724236 - Inline ExecScript and move ExecScriptAndCoerceString to where it is used r=arai
...
ExecScript returning a value was only used in one place, and that call always
coerced the return value to a string.
Differential Revision: https://phabricator.services.mozilla.com/D218451
2024-10-30 13:41:44 +00:00
Bryan Thrall
e859d8b8d0
Bug 1724236 - Move Compile and Decode out of JSExecutionContext r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218450
2024-10-30 13:41:44 +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
38fb4a0034
Bug 1724236 - Move InstantiateStencil call out of JoinOffThread r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D225361
2024-10-30 13:41:43 +00:00
Bryan Thrall
e6436b95c3
Bug 1724236 - Move InstantiateStencil out of Compile and Decode r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218449
2024-10-30 13:41:42 +00:00
Bryan Thrall
ffd49dfc27
Bug 1724236 - Move ExecScript out of JSExecutionContext r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D218448
2024-10-30 13:41:42 +00:00