Yulia Startsev
a06220c638
Bug 1742437 - move mLineNo from ScriptLoadRequest to DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136745
2022-02-21 15:39:06 +00:00
Yulia Startsev
b58fcd4a44
Bug 1742437 - move mWebExtGlobal from ScriptLoadRequest to DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136744
2022-02-21 15:39:06 +00:00
Yulia Startsev
1091b7108c
Bug 1742437 - move mIsPreload from ScriptFetchOptions to DOMScriptLoadContext, and introduce GetRootModule; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136743
2022-02-21 15:39:05 +00:00
Yulia Startsev
0ed52f4823
Bug 1742437 - move mElement from ScriptFetchOptions to DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136742
2022-02-21 15:39:05 +00:00
Yulia Startsev
55cd96e998
Bug 1742437 - Split ScriptLoadRequest into ScriptLoadRequest and DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D134041
2022-02-21 15:39:04 +00:00
Norisz Fay
87b7611370
Backed out 12 changesets (bug 1742437) for causing Bp-hybrid bustages on ModuleLoader.obj
...
Backed out changeset 7d5683180ac3 (bug 1742437)
Backed out changeset a48aff5f2555 (bug 1742437)
Backed out changeset 7e54a223001d (bug 1742437)
Backed out changeset 3a34d557d474 (bug 1742437)
Backed out changeset f29451ea18dc (bug 1742437)
Backed out changeset c0bd1d29be62 (bug 1742437)
Backed out changeset 8b970fb6e4e6 (bug 1742437)
Backed out changeset 729c48e34d6b (bug 1742437)
Backed out changeset 9355004c7f6a (bug 1742437)
Backed out changeset 0a5f61274aed (bug 1742437)
Backed out changeset a50f60a612d3 (bug 1742437)
Backed out changeset 0ac6d9d26e2b (bug 1742437)
2022-02-18 00:00:41 +02:00
Yulia Startsev
5b984dcbfb
Bug 1742437 - re-scope all generic module/script loader files under js/loader; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D138133
2022-02-17 15:57:52 +00:00
Yulia Startsev
e92cc07dad
Bug 1742437 - move DOM script context into own file and rename it; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D138132
2022-02-17 15:57:51 +00:00
Yulia Startsev
fce4457549
Bug 1742437 - move DOM module loader into own file; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D137531
2022-02-17 15:57:51 +00:00
Yulia Startsev
f532c642d3
Bug 1742437 - Create DOM specific Module Loader; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D137298
2022-02-17 15:57:50 +00:00
Yulia Startsev
3c2ac7ca1a
Bug 1742437 - move FireScript.* methods from DOMScriptLoadContext to ScriptLoader;r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D137441
2022-02-17 15:57:50 +00:00
Yulia Startsev
aa436a7654
Bug 1742437 - clean up DOMScriptLoadRequest creation; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136746
2022-02-17 15:57:50 +00:00
Yulia Startsev
3ffa055c53
Bug 1742437 - move mLineNo from ScriptLoadRequest to DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136745
2022-02-17 15:57:49 +00:00
Yulia Startsev
c72a87da4b
Bug 1742437 - move mWebExtGlobal from ScriptLoadRequest to DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136744
2022-02-17 15:57:49 +00:00
Yulia Startsev
01bec7241f
Bug 1742437 - move mIsPreload from ScriptFetchOptions to DOMScriptLoadContext, and introduce GetRootModule; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136743
2022-02-17 15:57:48 +00:00
Yulia Startsev
21c237b046
Bug 1742437 - move mElement from ScriptFetchOptions to DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D136742
2022-02-17 15:57:48 +00:00
Yulia Startsev
70ff292d33
Bug 1742437 - Split ScriptLoadRequest into ScriptLoadRequest and DOMScriptLoadContext; r=jonco,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D134041
2022-02-17 15:57:48 +00:00
Marian-Vasile Laza
b29042faba
Backed out 3 changesets (bug 1753709) for causing build bustages on ScriptLoader.cpp. CLOSED TREE
...
Backed out changeset 8d2f548f2b46 (bug 1753709)
Backed out changeset 9d41db9f2e17 (bug 1753709)
Backed out changeset 13dbf5b806ec (bug 1753709)
2022-02-16 18:51:37 +02:00
Nicolas B. Pierron
af10d284b0
Bug 1753709 - Add test case to verify delazification strategy is used. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D138541
2022-02-16 11:01:33 +00:00
Nicolas B. Pierron
b905a794bf
Bug 1753709 - JavaScript: Add a preference to switch between delazification strategies. r=arai
...
This patch changes the way we parse JavaScript coming from Necko while loading
web pages, by adding an about:config flag named
javascript.options.delazification.strategy which is used to select between:
0 - On Demand
1 - Concurrent Depth First
255 - Parse Everything Eagerly
Previously, we moved from On-demand delazification, to parsing everything
eagerly to improve responsiveness of the browser, but we knew that more room for
optimization exists.
This toogle is meant to explore the space of delazification strategies, such
that we can parse functions of JavaScript files on an helper thread, while the
JavaScript file is being executed on the main thread. The space of
delazification strategies goes from ordering the order in which functions are
processed, as well as filtering functions which are processed. Not all functions
have to be delazified, and if the main thread needs a function which is not
parsed yet, it will fallback to parsing it on-demand.
Differential Revision: https://phabricator.services.mozilla.com/D138034
2022-02-16 11:01:33 +00:00
Kagami Sascha Rosylight
832fabe496
Bug 1539884 - Part 17: Mark nsIScriptLoaderObserver::scriptEvaluated as can_run_script r=masayuki
...
Depends on D134107
Differential Revision: https://phabricator.services.mozilla.com/D134108
2021-12-17 13:27:52 +00:00
Yulia Startsev
220e8ff395
Bug 1745626 - Dynamic import should always try to unblock onload event in DOM context; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D133629
2021-12-14 10:53:58 +00:00
Tooru Fujisawa
69c348d423
Bug 1734098 - Part 11: Add JS::DecodeStencilOffThread. r=tcampbell
...
Also make JS::CanDecodeOffThread to receive JS::DecodeOptions.
Differential Revision: https://phabricator.services.mozilla.com/D133052
2021-12-10 04:28:29 +00:00
Tooru Fujisawa
a95f884d9f
Bug 1734098 - Part 7: Add JS::CompileModuleToStencilOffThread. r=tcampbell
...
Differential Revision: https://phabricator.services.mozilla.com/D133048
2021-12-10 04:28:28 +00:00
Tooru Fujisawa
29e27e1a82
Bug 1734098 - Part 3: Use JS::CompileToStencilOffThread instead of JS::CompileOffThread in ScriptLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D133044
2021-12-10 04:28:26 +00:00
Iulian Moraru
e83fdb85a5
Backed out 17 changesets (bug 1744178, bug 1734098) for causing leaks. CLOSED TREE
...
Backed out changeset 08070838c7d2 (bug 1734098)
Backed out changeset cfdf7ed9a5a2 (bug 1734098)
Backed out changeset 02d7ca7fc45c (bug 1734098)
Backed out changeset 7b7c59fc644b (bug 1734098)
Backed out changeset 630055366dac (bug 1734098)
Backed out changeset da83b4571cf2 (bug 1734098)
Backed out changeset 323af9d3e0e1 (bug 1734098)
Backed out changeset cf458ad5345a (bug 1734098)
Backed out changeset a85846f79eb5 (bug 1734098)
Backed out changeset 0d07931e6bc8 (bug 1734098)
Backed out changeset ffd72fa3fc59 (bug 1734098)
Backed out changeset 3174f1ecfd03 (bug 1734098)
Backed out changeset cfb19671fd4e (bug 1734098)
Backed out changeset c3b9c8221059 (bug 1734098)
Backed out changeset 532328aedaaa (bug 1734098)
Backed out changeset 48aa5ca15135 (bug 1734098)
Backed out changeset 6ca5bceb693c (bug 1744178)
2021-12-09 23:36:34 +02:00
Tooru Fujisawa
b94d8df7b4
Bug 1734098 - Part 11: Add JS::DecodeStencilOffThread. r=tcampbell
...
Also make JS::CanDecodeOffThread to receive JS::DecodeOptions.
Differential Revision: https://phabricator.services.mozilla.com/D133052
2021-12-09 18:21:13 +00:00
Tooru Fujisawa
05f5605a4e
Bug 1734098 - Part 7: Add JS::CompileModuleToStencilOffThread. r=tcampbell
...
Differential Revision: https://phabricator.services.mozilla.com/D133048
2021-12-09 18:21:12 +00:00
Tooru Fujisawa
620be45766
Bug 1734098 - Part 3: Use JS::CompileToStencilOffThread instead of JS::CompileOffThread in ScriptLoader. r=nbp
...
Differential Revision: https://phabricator.services.mozilla.com/D133044
2021-12-09 18:21:10 +00:00
Yulia Startsev
d159b2e9fd
Bug 1311726 - Split ScriptLoader into ScriptLoader and ModuleLoader; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132683
2021-12-09 13:26:21 +00:00
Yulia Startsev
561f830468
Bug 1311726 - Create ScriptLoaderInterface; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132614
2021-12-09 13:26:20 +00:00
Yulia Startsev
2c1b4199ea
Bug 1311726 - Move GetProfilerLabelForRequest to ScriptLoadRequest; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132951
2021-12-09 13:26:20 +00:00
Yulia Startsev
962ed16141
Bug 1311726 - Move getScriptSource to ScriptLoadRequest; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132950
2021-12-09 13:26:19 +00:00
Yulia Startsev
421ad3b4ca
Bug 1311726 - Move Module Evaluation into ModuleLoader; r=jonco
...
Module evaluation is independent of it's context. We just need the globalObject to set up the
execution environment.
Differential Revision: https://phabricator.services.mozilla.com/D132678
2021-12-09 13:26:19 +00:00
Yulia Startsev
1b5682c6e3
Bug 1311726 - Move module hook instantiation to ModuleLoader constructor; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132677
2021-12-09 13:26:19 +00:00
Yulia Startsev
1e6a349ce6
Bug 1311726 - ModuleLoadRequest loader is a ModuleLoader; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132825
2021-12-09 13:26:18 +00:00
Yulia Startsev
c33c5b96b9
Bug 1311726 - Move Dynamic Import Methods to ModuleLoader; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132613
2021-12-09 13:26:18 +00:00
Yulia Startsev
7d0e3305de
Bug 1311726 - Move CheckModuleDependeciesLoaded to ModuleLoadRequest; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132612
2021-12-09 13:26:17 +00:00
Yulia Startsev
dc01df08b4
Bug 1311726 - Move methods related to resolution and error handling to ModuleLoader;r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132611
2021-12-09 13:26:17 +00:00
Yulia Startsev
4bca24161d
Bug 1311726 - Move methods related to instantiating the module tree to ModuleLoader;r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132610
2021-12-09 13:26:17 +00:00
Yulia Startsev
4e701f81f2
Bug 1311726 - Create ModuleLoader Class; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132609
2021-12-09 13:26:16 +00:00
Yulia Startsev
395fed5111
Bug 1311726 - Pass JSContext instead of JSAPI to FillCompileOptionsForRequest; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132608
2021-12-09 13:26:16 +00:00
Yulia Startsev
ac691d1891
Bug 1311726 - Split EvaluateScript into EvaluateScript and EvaluateModule; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132607
2021-12-09 13:26:16 +00:00
Yulia Startsev
2479e75343
Bug 1311726 - Remove second initialization of currentScript in EvaluateScript; r=jonco
...
first initialization is on line 3140 and covers the module case.
Differential Revision: https://phabricator.services.mozilla.com/D132606
2021-12-09 13:26:15 +00:00
Yulia Startsev
ef150421f1
Bug 1311726 - Split StartLoad into StartClassicLoad, StartModuleLoad, StartLoadInternal; r=jonco
...
The goal of splitting classic script loading from module script loading was to keep a minimum
selection of methods for other script loaders to implement. In addition, the security
flags were distinct for the two cases, and had no overlap.
Caching behavior was left as shared, as it is likely modules will have this soon.
Differential Revision: https://phabricator.services.mozilla.com/D132605
2021-12-09 13:26:15 +00:00
Yulia Startsev
c97cf9954a
Bug 1311726 - Switch MarkerInnerWindowIdFromDocShell to MarkerInnerWindowIdFromJSContext; r=canaltinova
...
The Scriptloader will be shared by multiple modules, not all of them have ready access to the
docshell (MozJSComponentLoader currently uses the JSContext for this purpose. Workers and worklets
are not tracking performance yet). Our profiling code relies on the docShell present in the script loader. This changes the
current profiling code to use the JSContext instead.
Differential Revision: https://phabricator.services.mozilla.com/D132604
2021-12-09 13:26:14 +00:00
Yulia Startsev
bbf08a7bbc
Bug 1311726 - Only set "ProcessingScript" tag when executing; r=jonco
...
Previously, we were setting the ProcessingScriptTag for Module compilation as well as script
execution. This patch creates a helper function (GetGlobalWithContext) and removes a superfluous
setting of the "ProcessingScriptTag".
ProcessingScriptTag should be set when a script is executing, as it helps correct our behavior
around history replacement during JS execution: https://searchfox.org/mozilla-central/rev/e9cd2997be1071b9bb76fc14df0f01a2bd721c30/dom/base/LocationBase.cpp#223-231
Differential Revision: https://phabricator.services.mozilla.com/D132603
2021-12-09 13:26:14 +00:00
Butkovits Atila
9982657a6a
Backed out 18 changesets (bug 1311726) for causing Hazard failures at ScriptLoader.cpp:. CLOSED TREE
...
Backed out changeset 0e1179305bc2 (bug 1311726)
Backed out changeset fd3a9e4f5e5e (bug 1311726)
Backed out changeset d6f6a7d13dc2 (bug 1311726)
Backed out changeset 7b266f1fbbff (bug 1311726)
Backed out changeset 9ecb9ac4f2f7 (bug 1311726)
Backed out changeset 2deb35690efb (bug 1311726)
Backed out changeset a151ddb7068d (bug 1311726)
Backed out changeset 79aac20615b8 (bug 1311726)
Backed out changeset 258188246118 (bug 1311726)
Backed out changeset 0ef6c06dac5b (bug 1311726)
Backed out changeset 340bd3d73849 (bug 1311726)
Backed out changeset d130a9772d31 (bug 1311726)
Backed out changeset 15df1b7e0208 (bug 1311726)
Backed out changeset ebc87f932050 (bug 1311726)
Backed out changeset 68ab853d072d (bug 1311726)
Backed out changeset eac12c9d76b7 (bug 1311726)
Backed out changeset beb9e9b17522 (bug 1311726)
Backed out changeset bfea110e6afe (bug 1311726)
2021-12-09 02:23:18 +02:00
Yulia Startsev
8e5d0bf0c6
Bug 1311726 - Split ScriptLoader into ScriptLoader and ModuleLoader; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132683
2021-12-08 16:57:23 +00:00
Yulia Startsev
db9e217a01
Bug 1311726 - Create ScriptLoaderInterface; r=jonco
...
Differential Revision: https://phabricator.services.mozilla.com/D132614
2021-12-08 16:57:22 +00:00