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

96212 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione d3498e1041 Bug 1655866: Part 5 - Use native PermitUnload implementation from front-end code. r=nika,mconley
Differential Revision: https://phabricator.services.mozilla.com/D88318
2020-09-21 22:41:04 +00:00
Kris Maglione 0ae5bf64c5 Bug 1655866: Part 4 - Handle OOP beforeunload listeners in PermitUnload(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88317
2020-09-21 22:41:01 +00:00
Kris Maglione fb3a9daf66 Bug 1655866: Part 2 - Move HasBeforeUnload flag to WindowContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88315
2020-09-21 22:40:51 +00:00
Kris Maglione 2d863e9e4c Bug 1655866: Part 1 - Add async version of beforeUnloadCheck prompt. r=geckoview-reviewers,Gijs,agi
Differential Revision: https://phabricator.services.mozilla.com/D88314
2020-09-21 22:40:42 +00:00
Mihai Alexandru Michis a9f468308c Backed out 2 changesets (bug 1663747) for causing xpcshell failures in ThrottledEventQueue.
CLOSED TREE

Backed out changeset 643aa6baf458 (bug 1663747)
Backed out changeset 491472fe44f4 (bug 1663747)
2020-09-22 03:54:59 +03:00
Kris Maglione 5ae4ea4f07 Bug 1663747: Part 1 - Fix sCurrentShutdownPhase and add PastShutdownPhase() API. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89809
2020-09-21 19:18:43 +00:00
Kris Maglione 5d2d807d44 Bug 1665862: Don't use AutoSafeJSContext in XMLHttpRequestWorker. r=nika
It crashes if it fails to create the unprivileged junk scope, which is not
great when it's being used by a fallible function.

Differential Revision: https://phabricator.services.mozilla.com/D90753
2020-09-19 16:39:58 +00:00
alwu 946ca59998 Bug 1666089 - enable MediaSession and MediaMetadata interface. r=emilio
We have enabled Media Session API by default in bug1665496.

Differential Revision: https://phabricator.services.mozilla.com/D90796
2020-09-21 14:59:09 +00:00
Simon Giesecke 33e9f93ba7 Bug 1666200 - Use in-place construction of Result<nsAutoCString, nsresult>. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D90842
2020-09-21 13:15:20 +00:00
Simon Giesecke eaa00050e4 Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.

Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 13:14:10 +00:00
Simon Giesecke 2e065c64d6 Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 13:12:48 +00:00
pbz b81e69ee95 Bug 1314912 - Rate limit calls to History and Location interfaces. r=smaug
This adds a rate limit to methods and setters of the History and Location
for non-system callers.
The rate limit is counted per BrowsingContext and can be controlled by prefs.

This patch is based on the original rate limit patch by :freesamael.

Differential Revision: https://phabricator.services.mozilla.com/D90136
2020-09-21 11:54:50 +00:00
Butkovits Atila 270e7e2200 Backed out 5 changesets (bug 1665927, bug 1665614, bug 1665850) for causing bustage on Result.h. CLOSED TREE
Backed out changeset 1467e76399e8 (bug 1665927)
Backed out changeset ebd4dfbc0a88 (bug 1665850)
Backed out changeset 5e23340e3b39 (bug 1665850)
Backed out changeset 5bc547e7a773 (bug 1665850)
Backed out changeset 8d88afb85a78 (bug 1665614)
2020-09-21 15:25:16 +03:00
Christoph Kerschbaumer f8dee2022e Bug 1665903: Fix typo in test_same_site_cookies_toplevel_nav. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D90835
2020-09-21 11:37:17 +00:00
Simon Giesecke 70bda1ef61 Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.

Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 11:11:02 +00:00
Simon Giesecke 3b0420646e Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 10:38:19 +00:00
Edgar Chen 8eda55142f Bug 1662587 - Make pointer lock fission compatible; r=smaug
Now requesting/releasing pointer lock in content process will send IPC to let
parent process know which content process request a lock, so parent process
could dispatch mouse event to the right content process. And if there is already
a content proess had a lock, parent process will reject lock request from other
content proesses.

Differential Revision: https://phabricator.services.mozilla.com/D90313
2020-09-21 11:01:27 +00:00
Simon Giesecke 2b9f6a22b0 Bug 1663924 - Use IDB_TRY in ExecuteCachedStatement. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D90233
2020-09-21 10:39:21 +00:00
Simon Giesecke afcc0534f1 Bug 1663924 - Use ExecuteCachedStatement where possible. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90232
2020-09-21 10:39:13 +00:00
Simon Giesecke f05dba1711 Bug 1663924 - Add ScopedLogExtraInfo. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90112
2020-09-21 10:32:55 +00:00
Simon Giesecke 49044cd506 Bug 1663924 - Use std::any_of/IDB_TRY in FactoryOp::DirectoryOpen. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D90270
2020-09-21 10:32:32 +00:00
Andreas Farre c79156cb2c Bug 1666196 - Part 2: Change to same domain navigation. r=smaug
To force navigation to block on the long running script it needs to be
loading a page on the same domain as the blocking script, otherwise
fission and Session history in the parent will happily change
remoteness to another process and load immediately.

Depends on D90825

Differential Revision: https://phabricator.services.mozilla.com/D90826
2020-09-21 10:09:35 +00:00
Andreas Farre a26f502e34 Bug 1666196 - Part 1: Move decision to cancel to ProcessHangMonitor. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90825
2020-09-21 10:05:21 +00:00
Emilio Cobos Álvarez 3cfb419d00 Bug 1665816 - CSSOM should respect rule-level property restrictions. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D90729
2020-09-21 09:57:46 +00:00
Cameron McCormack a9b6211496 Bug 1658343 - Propagate intrinsic sizes from SVG documents in embed/object to parent using IPC. r=kmag,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D90055
2020-09-21 02:09:57 +00:00
Narcis Beleuzu 1a447211aa Backed out changeset 12856303559f (bug 1662587) for mochitest crashes on test_pointerlock_xorigin_iframe.html 2020-09-21 04:07:59 +03:00
Edgar Chen de6c51cfb3 Bug 1662587 - Make pointer lock fission compatible; r=smaug
Now requesting/releasing pointer lock in content process will send IPC to let
parent process know which content process request a lock, so parent process
could dispatch mouse event to the right content process. And if there is already
a content proess had a lock, parent process will reject lock request from other
content proesses.

Differential Revision: https://phabricator.services.mozilla.com/D90313
2020-09-19 00:01:51 +00:00
Sylvestre Ledru ec8859e69e Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90793
2020-09-20 10:14:09 +00:00
Peter Van der Beken aa030970db Bug 1664656 - Decide whether to add a new entry based on the load type. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90028
2020-09-20 12:40:10 +00:00
Dorel Luca 594edf3c57 Backed out 3 changesets (bug 1664656, bug 1664655) for multiple failures in checkouts/gecko/docshell/base/nsDocShell.cpp
Backed out changeset ac1e652efeb6 (bug 1664655)
Backed out changeset c8c1abf5f616 (bug 1664656)
Backed out changeset 3c1e9e36a39e (bug 1664656)
2020-09-19 16:38:26 +03:00
Peter Van der Beken 9d54c7ab78 Bug 1664656 - Decide whether to add a new entry based on the load type. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90028
2020-09-18 16:49:35 +00:00
longsonr 45d0b4e8da Bug 1665921 - check result of SVGGeometryProperty calls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90694
2020-09-18 13:45:32 +00:00
Jean-Yves Avenard 24f0e7c0a9 Bug 1665945 - Fix compilation. r=gerald
Fix ""error: member access into incomplete type 'mozilla::layers::IGPUVideoSurfaceManager" build bustage with --disable-accessibility"
we don't want to fully declare the class in the header as it would require to leak most of gfx headers.

Differential Revision: https://phabricator.services.mozilla.com/D90776
2020-09-19 01:04:27 +00:00
Simon Giesecke 9ab2d5caed Bug 1663924 - Use std::find_if in ConnectionPool::IdleTimerCallback. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D90267
2020-09-18 21:02:12 +00:00
Kartikaya Gupta f38b3ecb1b Bug 1665955 - Stop including nsIScrollableFrame.h from Element.h. r=emilio
Changes to nsIScrollableFrame.h cause the world to rebuild which I find annoying.
This removes the inclusion into Element.h which is responsible for the
world-rebuilding and is relatively easy to eliminate. A bunch of usages of
nsIScrollableFrame get moved from .h files into .cpp files and I include the
header into .cpp files as needed.

Differential Revision: https://phabricator.services.mozilla.com/D90735
2020-09-18 18:32:13 +00:00
Nika Layzell 1d58fba49c Bug 1659696 - Check PendingInitialization before targeting in window.open, r=kmag
This requires adding the flag as a synced field on the BrowsingContext, and
checking it in a few more places. Attempts to open a new window in this racy
manner will now raise an exception.

This should avoid the issue from bug 1658854 by blocking the buggy attempts to
load before the nested event loop has been exited.

Differential Revision: https://phabricator.services.mozilla.com/D87927
2020-09-16 20:47:55 +00:00
Sebastian Hengst cf7b0b4636 Backed out 3 changesets (bug 1663917) for crashes (bug 1665983).
Crashes with
* [@ arena_dalloc | `anonymous namespace'::setup_wasapi_stream]
* [@ `anonymous namespace'::wasapi_create_device ]

Backed out changeset f08ef676251a (bug 1663917)
Backed out changeset 5bf586f8f81a (bug 1663917)
Backed out changeset 91ff0dad958b (bug 1663917)
2020-09-18 20:07:30 +02:00
David Major 3e928e865e Bug 1665351 - Disable CFG for plugin hook stub calls r=handyman
As we saw in bug 1598119, 32-bit nop-space patches aren't compatible with clang 11's CFG because they return to the second instruction of the hooked function.

The `FunctionHook`s for plugins were pulling raw function pointers out of the interceptor stubs, so they didn't get the benefit of the stub's `operator()` that already has the CFG annotation.

As a bandaid, this patch marks all users of `BasicFunctionHook::OriginalFunction()` with the CFG annotation as well. A more thorough fix might be to somehow pass through to the stub's `operator()`, but we need something before merge day and I'm not confident in being able to do that regression-free in time.

Differential Revision: https://phabricator.services.mozilla.com/D90629
2020-09-18 16:27:03 +00:00
Simon Giesecke 2609e42ecb Bug 1663924 - Use CollectWhileHasResult at more places. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D89919
2020-09-18 15:50:54 +00:00
Simon Giesecke a24e178a69 Bug 1663924 - Extract CollectWhileHasResult function. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D89918
2020-09-18 15:50:41 +00:00
Simon Giesecke e336da143f Bug 1663924 - Extract CreateAndExecuteSingleStepStatement function. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D89913
2020-09-18 15:50:28 +00:00
Simon Giesecke 5368882321 Bug 1663924 - Use IDB_TRY* in CreateStorageConnection. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D89905
2020-09-18 15:50:16 +00:00
Simon Giesecke ad0ddfc648 Bug 1663924 - Change GetCachedStatement to return a Result rather than use an output parameter. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D89897
2020-09-18 15:50:08 +00:00
Valentin Gosu 486de00f22 Bug 1665355 - Don't throw on appcache.update() if the storage is disabled r=baku
To avoid applications breaking, this method shouldn't throw when called if the
pref is set to off.

To reproduce go to: https://webdbg.com/test/appcache/
Open devtools console
Type: appCache.update()
Make sure it doesn't throw

Differential Revision: https://phabricator.services.mozilla.com/D90390
2020-09-18 13:57:11 +00:00
Simon Giesecke f01767bb45 Bug 1665083 - QM_TRY (without _VAR) should fail to compile when the success type is not empty. r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90274
2020-09-18 14:51:54 +00:00
Jean-Yves Avenard 66d6c40aa5 Bug 1653060 - P5. Ensure no task gets dispatched after shutdown. r=mattwoodrow
And fix thread-safety access to sRemoteDecoderManagerChildThread static while at it.

Differential Revision: https://phabricator.services.mozilla.com/D90506
2020-09-17 06:35:15 +00:00
Jean-Yves Avenard 298b6203a1 Bug 1653060 - P4. Wait until all MediaRemoteDecoderManagerParent have closed before killing process. r=mattwoodrow.
We unfortunately can't use the AsyncShutdownService in either the GPU or RDD process.

So we add a little utility class AsyncBlockers that will resolve its promise once all services have deregistered from it.

We use it to temporily suspend the RDDParent or GPUParent from killing the process, up to 10s.

This allows for cleaner shutdown as the parent process doesn't guarantee the order in which processes are killed (even though it should).

Differential Revision: https://phabricator.services.mozilla.com/D90487
2020-09-18 11:07:13 +00:00
Jean-Yves Avenard e748bb2d7b Bug 1653060 - P3. Use nsCOMPtr. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90486
2020-09-18 11:07:15 +00:00
Jean-Yves Avenard f713b4f58e Bug 1653060 - P2. Ensure the RDD process gets shutdown after content processes. r=mjf
The RDD process gets shutdown following a NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
Notifications are processed in LIFO order, since the RDD process is started on demand it would have typically be registered after a content process.
We must ensure that the RDD get shutdown after all content processes so that it can receive notifications that the RemoteDecoderManagerChilds are shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D90485
2020-09-18 11:07:18 +00:00
Denis Palmeiro 27ec435b3b Bug 1665724: Clear mRunnable of request if user goes OOM while trying to off-thread compile. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90645
2020-09-18 10:31:45 +00:00