Граф коммитов

514 Коммитов

Автор SHA1 Сообщение Дата
Denis Palmeiro d2a8c4a659 Bug 1709139 - Replace JS pageload proportion probes with absolute time measurements and add new probes to measure GC and main thread parsing impact during page load. r=sfink,iain,smaug
Replace JS pageload proportion probes with absolute time measurements and add new probes to measure GC and main thread parsing impact during page load.

Differential Revision: https://phabricator.services.mozilla.com/D114388
2021-05-12 16:38:40 +00:00
Kagami Sascha Rosylight 924e28c20b Bug 1620505 - Clear currentScript after running microtasks r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D114442
2021-05-06 13:36:34 +00:00
Ted Campbell 89afad4d44 Bug 1706937 - Cleanup JS source-element callback. r=jandem
Rename the JSGetElementCallback hook to JSSourceElementCallback to avoid
confusion with GetElement operations.

Differential Revision: https://phabricator.services.mozilla.com/D113985
2021-05-03 20:08:06 +00:00
Matthew Gaudet 810f80185c Bug 1702278 - Defer setting debug metadata until after script compilation is finished. r=tcampbell,smaug
Differential Revision: https://phabricator.services.mozilla.com/D110459
2021-04-20 15:31:14 +00:00
Matthew Gaudet a0ff0d57e7 Bug 1702278 - Make CompileOptions a member of JSExecutionContext r=tcampbell
This simplified the use of JSExecutionContext, and make future patches
in this stack simpler.

Differential Revision: https://phabricator.services.mozilla.com/D110458
2021-04-20 15:31:13 +00:00
Yulia Startsev eed5941314 Bug 1704561 - Ensure that Module return value is an object before binding it to evaluationPromise; r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D111849
2021-04-15 12:28:48 +00:00
Jonatan Klemets 5c6179f100 Bug 1668330 - Part 2: Modify the ScriptLoader to work with the API changes for import-assertions. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D109495
2021-04-14 18:04:48 +00:00
Bogdan Tara d593453f4a Backed out 2 changesets (bug 1668330) for GlobalObject.h related bustage and spidermonkey failures CLOSED TREE
DONTBUILD
Backed out changeset 2d76323e5c0c (bug 1668330)
Backed out changeset ac4f085c9f32 (bug 1668330)
2021-04-14 18:36:35 +03:00
Jonatan Klemets c845650f07 Bug 1668330 - Part 2: Modify the ScriptLoader to work with the API changes for import-assertions. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D109495
2021-04-14 15:22:57 +00:00
Yulia Startsev c781410bf5 Bug 1681046: fix non-js occuring error throw order for async modules; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D110961
2021-04-08 08:21:57 +00:00
smolnar 8844e16700 Backed out 3 changesets (bug 1681046) for causing jsreftest failures in ScriptLoader. CLOSED TREE
Backed out changeset 6704600819ed (bug 1681046)
Backed out changeset 37f56518116b (bug 1681046)
Backed out changeset f61cb7496a35 (bug 1681046)
2021-04-07 12:50:28 +03:00
Yulia Startsev 408b320570 Bug 1681046: fix non-js occuring error throw order for async modules; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D110961
2021-04-07 08:45:39 +00:00
Ted Campbell 9b6e632d81 Bug 1700954 - Remove remaining BinAST fragments from ScriptLoader. r=arai,hsivonen,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109765
2021-03-26 13:01:40 +00:00
Tom Schuster 40d981ca3a Bug 1536094 - CC changes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108532
2021-03-23 11:15:11 +00:00
Tom Schuster 01d4cafbb1 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-23 11:15:11 +00:00
Bogdan Tara a3fae8602d Backed out 3 changesets (bug 1536094) for causing bug 1700228 CLOSED TREE
Backed out changeset 464143c2b6ac (bug 1536094)
Backed out changeset 3462cb6573b1 (bug 1536094)
Backed out changeset d566c1c9e82f (bug 1536094)
2021-03-23 00:46:34 +02:00
Tom Schuster 68c7cd7283 Bug 1536094 - CC changes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108532
2021-03-22 16:22:27 +00:00
Tom Schuster bcb6e45e17 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Cosmin Sabou cac540c776 Backed out 3 changesets (bug 1536094) for causing valgrind failures.
Backed out changeset dfe051a9c91a (bug 1536094)
Backed out changeset c73979442002 (bug 1536094)
Backed out changeset 863933e887e8 (bug 1536094)
2021-03-22 20:34:36 +02:00
Tom Schuster 896f971e00 Bug 1536094 - CC changes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108532
2021-03-22 16:22:27 +00:00
Tom Schuster aa320997de Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Andrew McCreight 77cb6426d5 Bug 1699784 - Fix two 'outselves' typos. r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109106
2021-03-19 18:32:09 +00:00
Nika Layzell c733984c4b Bug 1675820 - Part 6: Make DocGroup cycle-collected, r=farre,smaug
Previously, the DocGroup type was not cycle-collected, as it needed to have
references from other threads for Quantum DOM. Nowadays the only off-main-thread
use of DocGroup is for dispatching runnables to the main thread which should be
tracked using a performance counter for about:performance. This means we can
remove the DocGroup references from these dispatching callsites, only storing
the Performance Counter we're interested in, and simplify make DocGroup be
cycle-collected itself.

This fixes a leak caused by adding the WindowGlobalChild getter to
WindowContext, by allowing cycles between the document and its BrowsingContext
to be broken by the cycle-collector.

Differential Revision: https://phabricator.services.mozilla.com/D108865
2021-03-18 19:24:50 +00:00
Chris Peterson 2d4ca059e8 Bug 1691889 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/. r=peterv
The MOZ_MUST_USE macro is defined as clang's and gcc's nonstandard __attribute__((warn_unused_result)). Now that we compile as C++17 by default (bug 1560664), we can replace MOZ_MUST_USE with C++17's standard [[nodiscard]] attribute.

The [[nodiscard]] attribute must precede a function declaration's declaration specifiers (like static, extern, inline, or virtual). The __attribute__((warn_unused_result)) attribute does not have this order restriction.

Differential Revision: https://phabricator.services.mozilla.com/D107355
2021-03-10 08:19:25 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
yulia ec9af4d409 Bug 1665330 - If a script is a module, increment the IgnoreDestructiveWrites counter r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D99898
2021-02-05 11:00:23 +00:00
Steve Fink 67527b7f14 Bug 1685420 - ~nsCOMPtr and related hazard fixes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D100966
2021-01-12 22:25:07 +00:00
Ted Campbell a8e1541ef9 Bug 1686572 - Return JS::OffThreadToken* from off-thread script compile. r=arai
Instead of using both an optional out-param and a boolean return value, we
can simply return the token directly. This is less error-prone and requires
no change to callers that did not use the out-param.

Differential Revision: https://phabricator.services.mozilla.com/D101654
2021-01-14 00:51:13 +00:00
Tooru Fujisawa a8ebb3a149 Bug 1674305 - Always use off-thread parse global in decode task and instantiate off-thread. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D101126
2021-01-13 23:31:16 +00:00
Dorel Luca 2a0e56c384 Backed out changeset 760123aa1758 (bug 1665330) for WPT failures in /html/webappapis/dynamic-markup-insertion/document-write/module-tla-import.html. CLOSED TREE 2021-01-13 16:57:11 +02:00
yulia c897e5a544 Bug 1665330 - If a script is a module, increment the IgnoreDestructiveWrites counter r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D99898
2021-01-13 11:41:01 +00:00
Tooru Fujisawa 33a5756351 Bug 1681308 - Add alignment requirement to XDR buffer. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D101125
2021-01-13 02:18:26 +00:00
yulia 0ff486bf16 Bug 1681664 - Allow Top-level await modules which fail to evaluate due to user action to fail without crashing. r=jonco,mconley
Differential Revision: https://phabricator.services.mozilla.com/D99809
2021-01-11 17:08:59 +00:00
Christoph Kerschbaumer cd9e96dc19 Bug 1677179: Allow module scripts in sandboxed iframe within about: page to load. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D98765
2021-01-10 18:42:04 +00:00
Masatoshi Kimura 3f402bfcc4 Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-07 15:18:52 +00:00
Razvan Maries 6a4eb25b10 Backed out 4 changesets (bug 1683464) for multiple perma failures. CLOSED TREE
Backed out changeset a5d315c017d0 (bug 1683464)
Backed out changeset 5f91001e4923 (bug 1683464)
Backed out changeset 1b7fe904e8af (bug 1683464)
Backed out changeset eb1c479fddca (bug 1683464)
2021-01-05 16:47:22 +02:00
Masatoshi Kimura dfb97ca7cf Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Depends on D100180

Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-05 12:21:46 +00:00
Razvan Maries 47f941747c Backed out changeset 540c9159c3c6 (bug 1681664) for perma failures on test_bug1681664.html. 2020-12-18 22:00:52 +02:00
yulia a1a1c495ea Bug 1681664 - Allow Top-level await modules which fail to evaluate due to user action to fail without crashing. r=jonco,mconley
Differential Revision: https://phabricator.services.mozilla.com/D99809
2020-12-18 12:37:36 +00:00
Simon Giesecke c368d437ee Bug 1680269 - Fix includes for ScriptLoadHandler. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D98492
2020-12-07 14:21:35 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
yulia 02bcdf5bde Bug 1519100 - Use pref to completely pref-off top-level await in the browser; r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D97184
2020-12-04 08:54:10 +00:00
yulia 0d160e1e0d Bug 1519100 - Implement module promises in html r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D95885
2020-12-04 08:54:03 +00:00