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

21084 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 72168631b0 Bug 1710845 - Get rid of NS_ERROR_DOM_INVALID_EXPRESSION_ERR; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114967
2021-05-12 23:32:38 +00:00
Edgar Chen acf4edd8ea Bug 1710840 - Part 2: Get rid of NS_ERROR_DOM_SVG_WRONG_TYPE_ERR; r=smaug
Depends on D114964

Differential Revision: https://phabricator.services.mozilla.com/D114965
2021-05-12 23:32:38 +00:00
Edgar Chen c681831600 Bug 1710840 - Part 1: Get rid of NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114964
2021-05-12 23:32:37 +00:00
Nicolas B. Pierron a4aef929a1 Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld
This change adds the ground work to share content provided by the JS engine of
the Parent process to initialize the JS engine of other threads and Content
processes.

The singleton class xpc::SelfHostedShmem is used to wrap the logic behind
holding the memory. The memory is initialized with `InitFromParent` or
`InitFromChild`. The memory is accessible using either the `Content` or
`Handle`.

The shared memory is transfered through the command line using
`mozilla::ipc::ExportSharedJSInit` and read using
`mozilla::ipc::ImportSharedJSInit` functions. The command line is used, as we
need the shared memory to be avilable for the JS engine initialization. The
command line is composed of a single command named `-jsInit` which is followed
by the handle (on Windows) and the length of the shared content.

The memory associated with the shared memory is cleared in `ShutdownXPCOM` after
closing all threads, and shuting down the JS engine. This is necessary as we
expect the JS engine to borrow content from the shared memory.

Differential Revision: https://phabricator.services.mozilla.com/D110576
2021-05-12 13:57:55 +00:00
Paul Bone 831e9abe44 Bug 1629064 - pt 9. Use the current idle slice to start the GC if we can r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110378
2021-05-12 06:46:11 +00:00
Edgar Chen f10ffb593c Bug 1709217 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_VALUE; r=smaug
Depends on D114185

Differential Revision: https://phabricator.services.mozilla.com/D114186
2021-05-11 19:38:46 +00:00
Edgar Chen 22ee127c8b Bug 1709217 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_SUPPORTED; r=smaug
Depends on D114184

Differential Revision: https://phabricator.services.mozilla.com/D114185
2021-05-11 19:38:46 +00:00
Edgar Chen 0362d20990 Bug 1709217 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_STATE; r=smaug
Depends on D114183

Differential Revision: https://phabricator.services.mozilla.com/D114184
2021-05-11 19:38:45 +00:00
Edgar Chen d1ca0306a2 Bug 1709217 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_INDETERM; r=smaug
Depends on D114182

Differential Revision: https://phabricator.services.mozilla.com/D114183
2021-05-11 19:38:45 +00:00
Edgar Chen b6a7d80197 Bug 1709217 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_ENABLED; r=smaug
Depends on D114181

Differential Revision: https://phabricator.services.mozilla.com/D114182
2021-05-11 19:38:44 +00:00
Edgar Chen 567d46362c Bug 1709217 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_EXEC_COMMAND; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114181
2021-05-11 19:38:44 +00:00
Alexandre Lissy bb8254d3dd Bug 1704683 - Avoid loop for closing fd r=jld
Differential Revision: https://phabricator.services.mozilla.com/D114088
2021-05-11 07:45:16 +00:00
Andreea Pavel 2d45c54c8f Bug 1683062 - disable 1113005.html on linux-qr r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D114647
2021-05-10 13:41:14 +00:00
Edgar Chen f8605ff45d Bug 1709214 - Get rid of NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114179
2021-05-10 12:20:17 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Jens Stutte 50a5a1110d Bug 1709887: Add missing #define in mingw builds. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D114569
2021-05-07 14:02:26 +00:00
Jon Coppeard 52d33f4288 Bug 1709849 - Replace use of JSGCInvocationKind with JS::GCOptions in the browser r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114512
2021-05-07 07:39:50 +00:00
Nika Layzell 1403a31aba Bug 1706365 - Part 2: Add tests for mozilla::Queue, r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D114523
2021-05-06 20:05:34 +00:00
Nika Layzell 151f89a2ab Bug 1706365 - Part 1: Safely invoke destructors and constructors in mozilla::Queue, r=xpcom-reviewers,kmag
This allows the `mozilla::Queue` type to be used more easily and without
causing assertion failures, leaks, or unsafe behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D112763
2021-05-06 20:05:34 +00:00
Nika Layzell ddfc865bf0 Bug 1706376 - Remove loud warning from BlockingResourceBase::Release(), r=xpcom-reviewers,mccr8
This warning previously fired loudly from the ports logic being added in bug
1706374 were acquired. As the warning also occasionally fires in existing code
and provides no safety guarantees, I think we should consider removing it.

Differential Revision: https://phabricator.services.mozilla.com/D112762
2021-05-06 20:05:33 +00:00
Alexandru Michis 574bea557a Backed out 14 changesets (bug 1705659, bug 472823, bug 669675) for causing bustages in nsHttpChannelAuthProvider.cpp
CLOSED TREE

Backed out changeset 42561f42313d (bug 669675)
Backed out changeset 2aee05c2d6f3 (bug 1705659)
Backed out changeset ff4348e0a307 (bug 1705659)
Backed out changeset 897868e22c81 (bug 1705659)
Backed out changeset c808bf01dfe8 (bug 1705659)
Backed out changeset 5c13ec25cc2e (bug 1705659)
Backed out changeset 4337214c8846 (bug 1705659)
Backed out changeset 18d3a604336a (bug 1705659)
Backed out changeset 3af362aa2b25 (bug 1705659)
Backed out changeset 36eff14cf2ea (bug 1705659)
Backed out changeset 8af29f96ac77 (bug 1705659)
Backed out changeset eab68e8bea29 (bug 1705659)
Backed out changeset 05492b6578a9 (bug 1705659)
Backed out changeset 3259a8cb3db1 (bug 472823)
2021-05-06 17:37:17 +03:00
Jens Stutte f2f68509d3 Bug 1690326: Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Win32 errors ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL need a mapping.
NS_ERROR_FILE_DISK_FULL is duplicate to NS_ERROR_FILE_NO_DEVICE_SPACE
Drive by: RejectJSPromise lacked some NS_ERROR_* mappings

Differential Revision: https://phabricator.services.mozilla.com/D113974
2021-05-06 14:00:06 +00:00
Valentin Gosu ec981ec694 Bug 1705659 - Static-analysis check auto fix for auth code r=necko-reviewers,dragana
Depends on D112604

Differential Revision: https://phabricator.services.mozilla.com/D112605
2021-05-06 13:17:23 +00:00
Christian Holler ad1556611a Bug 1709559 - Avoid using PL_str implementations when fuzzing network. r=valentin,necko-reviewers,xpcom-reviewers,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D114347
2021-05-05 18:09:28 +00:00
Toshihito Kikuchi fee87c9b39 Bug 1705579 - Skip WinIOAutoObservation if TLS is not available. r=gerald,aklotz
We hook several file APIs to record I/O performance data.  Since TLS is not
allocated in ntdll's loader worker thread, however, if someone does a file
operation, we hit read AV because `WinIOAutoObservation` uses `nsString` and
a thread local variable.

Currently we can see this crash happens only when a DLL rule of AppLocker is
defined, but theoretically this can happen when any module loaded in a worker
thread does file operation in its entrypoint.

The proposed fix is to skip `WinIOAutoObservation` if TLS is not available.

Differential Revision: https://phabricator.services.mozilla.com/D113032
2021-05-05 17:00:09 +00:00
Jesse Schwartzentruber 24ef473acb Bug 1708409 - Include libFuzzer in xpcshell r=decoder
libFuzzer is already included in the firefox binary, so including it in
libxul is problematic.

Differential Revision: https://phabricator.services.mozilla.com/D113899
2021-04-30 17:46:15 +00:00
Dorel Luca 440b9916fe Backed out 2 changesets (bug 1707924) for multiple failures with crash [@ BackgroundEventTarget::CreateBackgroundTaskQueue(char const*)]. CLOSED TREE
Backed out changeset 7fda47840322 (bug 1707924)
Backed out changeset c6213e0b8024 (bug 1707924)
2021-04-30 06:20:24 +03:00
Dorel Luca 67f232e72a Backed out changeset 1d91ad1c6c6e (bug 1704391) for multiple failures in xpcom/threads/nsTimerImpl.cpp. CLOSED TREE 2021-04-30 06:17:37 +03:00
kriswright 46818f47fb Bug 1707924 - Assert on DelayedRunnable dispatch on non debug builds. r=xpcom-reviewers,nika
This assertion currently only happens on debug builds, but attempts to dispatch delayed runnables after we have started or finished cancelling all delayed runnables in a TaskQueue may be causing shutdown hangs.

Differential Revision: https://phabricator.services.mozilla.com/D113839
2021-04-30 00:58:48 +00:00
kriswright b606492691 Bug 1707924 - Disallow creation of new TaskQueues after we have begun threads shutdown r=xpcom-reviewers,nika
I discovered today an order of events that causes a hang:
- A background TaskQueue is created after we [begin threads shut down](https://searchfox.org/mozilla-central/rev/759872688df15a5d6ab305ffe39d90450590bfec/xpcom/build/XPCOMInit.cpp#625)
- The task queue enters shut down, and attempts to [cancel delayed runnables] (https://searchfox.org/mozilla-central/rev/37edd2782e67e716dd07a85016da07b4d6275e5d/xpcom/threads/TaskQueue.cpp#163)
- The task queue [dispatches a runnable](https://searchfox.org/mozilla-central/rev/37edd2782e67e716dd07a85016da07b4d6275e5d/xpcom/threads/TaskQueue.cpp#140) which clears its delayed runnables
- Because delayed runnables are canceled before we stop servicing new threads, most TaskQueue clear this step. But if you create one at this part of shutdown, you dispatch it to a threadpool that cannot create new threads, so if there are no active threads this dispatch will not be serviced.

We could just change how to dispatch delayed runnable cancel tasks, but I think the best solution is to outright forbid the creation of new background TaskQueues after we have begun shutdown. Since this problem is specific to the way background task queue shut down, I don't want to change the behavior of any unrelated task queue who dispatch delayed runnables and shut down in their own time.

Differential Revision: https://phabricator.services.mozilla.com/D113449
2021-04-30 00:58:47 +00:00
kriswright ed84376d75 Bug 1704391 - Address timers cancelled after timer shutdown. r=xpcom-reviewers,nika
There is a chance that a timer will be cancelled by its holder after the timer thread and all of the timers have been cleaned up. Doing this can result in a hang on the mutex lock, likely because the mutex is now pointing to something else. I'm not completely familiar with the inner workings of our timers so I'm not sure what the best fix is here. I decided to follow a pattern in our threading shutdown routines and flag the timer shutdown so the timers can't attempt to cancel past a certain point where they would be shutdown anyway. This is tricky because there are timers created during XPCOM shutdown all the way up until we shutdown the timer thread. Checking for the timer thread outside of the lock could also result in a race with timer shutdown. This value is an attempt to address this without breaking timers shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D113448
2021-04-30 00:58:42 +00:00
Sean Feng 53d05dfbc0 Bug 1708070 - Use VsyncTaskManager::WillRunTask to change InputVsyncState r=smaug
Currently, we use `VsyncTaskManager::DidRunTask` to change state from
`RunVsync` to `NoPendingVsync`, however, the issue is that if the vsync
starts an event loop (for instance, by using requestAnimationFrame), and
the event loop starts another input task, Firefox crashes because input
tasks don't expect the state to be `RunVsync`.

So instead of using `DidRunTask`, we start to use `WillRunTask` to fix
it.

Differential Revision: https://phabricator.services.mozilla.com/D113613
2021-04-29 16:39:30 +00:00
Steve Fink 600f475b8f Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-28 16:37:32 +00:00
Bas Schouten 1055294cdd Bug 1640852: Grab IVirtualDesktopManager object off the main thread on the creation of the first nsWindow. r=mikedeboer,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D113446
2021-04-28 12:28:56 +00:00
Valentin Gosu de35210ee3 Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-28 09:33:46 +00:00
David Parks c99bc3e206 Bug 1704658: Implement ParamTraits for RefPtr<nsAtom> r=nika
Serialization for both nsStaticAtoms and nsDynamicAtoms.

Differential Revision: https://phabricator.services.mozilla.com/D112433
2021-04-27 08:20:18 +00:00
Cosmin Sabou 6be9f38faa Backed out changeset a89d4817a3cf (bug 1703374) for causing bustages and SliceBudget related crashes. CLOSED TREE 2021-04-27 02:09:01 +03:00
Steve Fink a559ffee38 Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-26 22:38:31 +00:00
Sean Feng dbf5f9f56b Bug 1706794 - Remove a MOZ_ASSERT from InputTaskManager.cpp r=smaug
This assertion is no longer making sense after the changes we made in
bug 1705251.

Differential Revision: https://phabricator.services.mozilla.com/D113166
2021-04-26 14:27:14 +00:00
Andreea Pavel bc7b15f9cf Backed out 3 changesets (bug 1704887) for Gtest failures on a CLOSED TREE
Backed out changeset 211dcc933514 (bug 1704887)
Backed out changeset bde076bfca7e (bug 1704887)
Backed out changeset 34e875f85b88 (bug 1704887)
2021-04-23 03:40:57 +03:00
Kris Wright aa02bb3f95 Bug 1704887 - Discard results of RemoveElement for DelayedRunnable r=necko-reviewers,xpcom-reviewers,mccr8,valentin
This silences a lint error on the previous patches in the series.

Differential Revision: https://phabricator.services.mozilla.com/D113160
2021-04-22 21:32:39 +00:00
Andreas Pehrson a8ff610593 Bug 1704887 - Remove assertions in OnDelayedRunnableRan. r=KrisWright,necko-reviewers,valentin
DelayedDispatch, in all current implementations, will set up a timer sync and
then Dispatch() a runnable. Since the timer is set up before the Dispatch, there
is a theoretical chance that the timer fires and dispatches a TimerEvent to the
target thread before DelayedDispatch managed to do so. When this happens the
internal DelayedDispatch runnable exits early, i.e., in practice it never runs.

The chance increases dramatically if the Dispatch() to the target in question is
tail dispatched, since the time between DelayedDispatch and the tail could be
non-trivial.

This patch removes the assert that checks that all DelayedRunnables that have
run have also been scheduled, since per the above no such guarantee exists.

Differential Revision: https://phabricator.services.mozilla.com/D112876
2021-04-22 21:32:39 +00:00
Andreas Pehrson f8b3146ebe Bug 1704887 - Add gtest for TaskQueue impl. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D112875
2021-04-22 21:32:38 +00:00
Emilio Cobos Álvarez 15f6b60e34 Bug 1706960 - Add datetime-local to StaticAtoms.py. r=smaug
This will allow it to be used from UA sheets (we need static atoms there
to share UA sheets with other processes).

Depends on D113114

Differential Revision: https://phabricator.services.mozilla.com/D113115
2021-04-22 15:14:33 +00:00
Narcis Beleuzu 33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Valentin Gosu db2d8bb0bc Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-22 13:41:34 +00:00
Sean Feng e4010e70f8 Bug 1705251 - InputTaskManager should expect vsync to run when the input vsync state is InputVsyncState::HasPendingVsync r=smaug
We have seen a lot of crashes with the new vsync input alignment code
because a possible case is
  1. Input event runs when there's a pending vsync (state=HasPendingVsync)
  2. Input event handler starts an event loop (state=HasPendingVsync)
  3. Vsync runs (state=HasPendingVsync) and crashes.

It crashes because the `DidRunTask` method for the input event doesn't
get a chance to run, which supposes to set the state to RunVsync.

Differential Revision: https://phabricator.services.mozilla.com/D112799
2021-04-21 14:46:26 +00:00
Gerald Squelart d67d35f1e3 Bug 1704654 - Display MOZ_LOG markers in marker chart as well - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D111742
2021-04-21 08:16:53 +00:00
Randell Jesup ea0d4c8068 Bug 1602862: Add checks for invalid StringClassFlags r=jld
Differential Revision: https://phabricator.services.mozilla.com/D99271
2021-04-20 19:34:03 +00:00
imoraru 9b430bb1a1 Merge autoland to mozilla-central a=merge 2021-04-20 12:49:23 +03:00