Commit Graph

19568 Commits

Author SHA1 Message Date
Noemi Erli
79c4589718 Merge autoland to mozilla-central. a=merge 2020-01-06 23:53:16 +02:00
ffxbld
96ff1ca153 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-01-06 15:53:38 +00:00
Boris Zbarsky
613f2313da Bug 1606672. Change nsIRunnablePriority values so increasing value indicates increased priority. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D58539

--HG--
extra : moz-landing-system : lando
2020-01-02 20:07:40 +00:00
Boris Zbarsky
dccfbd1681 Bug 1606657. nsIThreadManager.dispatchToMainThread should not assume that nsIRunnablePriority::PRIORITY_NORMAL is 0. r=smaug
This will let us change the numeric values of the priorities as needed.

Differential Revision: https://phabricator.services.mozilla.com/D58532

--HG--
extra : moz-landing-system : lando
2020-01-02 17:10:02 +00:00
Nathan Froyd
55a8bbf010 Bug 1605417 - use GeneratedFile template in xpcom/tests/gtest/; r=KrisWright
The template is slightly nicer and slighty more modern.

Differential Revision: https://phabricator.services.mozilla.com/D58006

--HG--
extra : moz-landing-system : lando
2019-12-27 18:38:13 +00:00
Simon Giesecke
55043c8787 Bug 1605045 - Document rationale and use cases for OwningNonNull. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D57944

--HG--
extra : moz-landing-system : lando
2020-01-06 12:02:15 +00:00
emalysz
8d905323d8 Bug 1579581, Part 1: Remove remaining CPU info off main-thread and load later on startup. r=mconley,chutten
Differential Revision: https://phabricator.services.mozilla.com/D51704

--HG--
extra : moz-landing-system : lando
2019-12-31 16:28:18 +00:00
Boris Zbarsky
9c1009c749 Bug 1606410. Make idle state peeking look more like idle state getting, so consumers can be more similar. r=smaug
This allows us to consistently use mCachedIdleDeadline to represent whether idle runnables should run.

Differential Revision: https://phabricator.services.mozilla.com/D58419

--HG--
extra : moz-landing-system : lando
2019-12-31 15:15:17 +00:00
Simon Giesecke
4170b9c2da Bug 1605119 - Add NS_NewCancelableRunnableFunction. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D57799

--HG--
extra : moz-landing-system : lando
2019-12-19 17:13:06 +00:00
Chris Peterson
406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Boris Zbarsky
c5dd0b9049 Bug 1605130. Make it harder to misuse OwningNonNull::forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D57805

--HG--
extra : moz-landing-system : lando
2019-12-19 20:57:43 +00:00
Toshihito Kikuchi
3c6a2a135e Bug 1601905 - Add quotes for a path including whitespaces in ShellExecuteWithIFile. r=aklotz
A fix for Bug 1588975 replaced the call to `LaunchWithIProcess` in
`nsMIMEInfoWin::LaunchWithFile` with the call to `ShellExecuteWithIFile` to use
`mozilla::ShellExecuteByExplorer`.  This caused a regression that if a filepath
contains whitespaces, we pass it to a target application without quoting it
while the old codepath `ShellExecuteWithIFile` quoted a path accordingly in
`assembleCmdLine`.

A proposed fix is to quote a path in the same way as `assembleCmdLine` does.
This patch also moves `assembleCmdLine` to an exported header so that we can add
a unittest to cover both of `assembleCmdLine` and a new function
`assembleSingleArgument.  It would be better to refactor these functions in the
future because many lines are duplicated.

Differential Revision: https://phabricator.services.mozilla.com/D56646

--HG--
extra : moz-landing-system : lando
2019-12-19 15:39:02 +00:00
Coroiu Cristina
13eac3a3c9 Backed out changeset eeb7c0aec59c (bug 1605130) for build bustage at build/src/obj-firefox/dist/include/mozilla/OwningNonNull. on a CLOSED TREE 2019-12-19 19:44:29 +02:00
Boris Zbarsky
0e01c0c207 Bug 1605130. Make it harder to misuse OwningNonNull::forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D57805

--HG--
extra : moz-landing-system : lando
2019-12-19 15:38:21 +00:00
Tyler
ea8b8dab8a Bug 1601475 - Remove ImageContentLoaded event and ImageDocumentLoaded message handling code across the tree r=Gijs,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D56051

--HG--
extra : moz-landing-system : lando
2019-12-18 21:46:51 +00:00
Andreas Farre
794b0068c3 Bug 1561715 - Part 3: Remove SchedulerGroup::IsBackground. r=smaug
Depends on D56745

Differential Revision: https://phabricator.services.mozilla.com/D56879

--HG--
extra : moz-landing-system : lando
2019-12-12 15:20:52 +00:00
Thomas Wisniewski
25d793d15f Bug 1603133 - Remove unused Fennec components in mobile/android/components; r=snorp
remove unused Fennec components in mobile/android/components (only the geckoview or extensions subdirs are used by GeckoView).

Differential Revision: https://phabricator.services.mozilla.com/D57394

--HG--
extra : moz-landing-system : lando
2019-12-18 23:52:48 +00:00
Thinker Li
dae3528029 Bug 1604084 - Fix log names of leak checking and refactor it. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D57222

--HG--
extra : moz-landing-system : lando
2019-12-18 17:02:10 +00:00
Nathan Froyd
ee4548c7d5 Bug 1604549 - remove scriptability and classinfo from nsThreadPool; r=bzbarsky
There's no reason for this class to be exposed to script; it'd be
awkward to use from script anyway, because the runnables script
dispatches would be running off the main thread.  Thread pool listeners
likewise can't be exposed to script or implemented by script, because
they are also running off the main thread.  The classinfo stuff just
seems like a relic from a bygone era.

Differential Revision: https://phabricator.services.mozilla.com/D57485

--HG--
extra : moz-landing-system : lando
2019-12-17 17:12:14 +00:00
Paul Bone
8b4c7c407f Bug 1584892 - Remove CycleCollectedJSContext::Initialize's nursery size param r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D47873

--HG--
extra : moz-landing-system : lando
2019-12-16 04:14:55 +00:00
Karl Tomlinson
da14646552 Bug 1603153 throw an exception from nsThread::GetPRThread() when there is no PRThread r=froydnj
as is done in LazyIdleThread::GetPRThread().

Differential Revision: https://phabricator.services.mozilla.com/D56826

--HG--
extra : moz-landing-system : lando
2019-12-12 21:53:58 +00:00
Nathan Froyd
7b36ee37f3 Bug 1584568 - add an API to construct background task queues; r=KrisWright
For some clients, just dispatching tasks to some anonymous background
thread is fine.  But for other clients, they need to guarantee that
dispatched events are executed in dispatch order, or they would like to
have some guarantee that functions executing in the background are
executing on a particular event target, or both.  For such uses cases,
we need something a little more sophisticated than simply handing out
the `BackgroundEventTarget` `nsThreadManager` is using.

Fortunately, we have an abstraction that provides these sorts of
guarantees already in `mozilla::TaskQueue`.  Since `mozilla::TaskQueue`
requires a bit of special care during shutdown, we're not going to hand
out new `TaskQueue` objects directly, but will instead hand out
`nsISerialEventTarget` wrappers of the newly-created `TaskQueues`.
`nsThreadManager` can then take care of shutting down all of the
`TaskQueue` objects itself, rather than requiring clients to handle
shutdown themselves.

Differential Revision: https://phabricator.services.mozilla.com/D47454

--HG--
extra : moz-landing-system : lando
2019-12-12 15:09:19 +00:00
Andreas Farre
9dcf7d5237 Bug 1561715 - Part 1: Remove unused functionality in SchedulerGroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55638

--HG--
extra : moz-landing-system : lando
2019-12-11 14:48:41 +00:00
Karl Tomlinson
535eeb4bbc Bug 1602646 remove checks that mThread is set before calling ShutdownInternal() r=froydnj
mShutdownRequired is already tested to avoid multiple shutdown runnables, so
callers need not test mThread, which is racy.

DecodePoolImpl, at least, can call both Shutdown() and AsyncShutdown()
on a single thread, and the later call can occur at the same time as the
thread is exiting its event loop and clearing mThread.
https://searchfox.org/mozilla-central/rev/23d4bffcad365e68d2d45776017056b76ca9a968/image/DecodePool.cpp#91

AsyncShutdown() and Shutdown() now return NS_OK when ShutdownInternal()
returns null because this would now usually happen when shutdown has already
been initiated.

Differential Revision: https://phabricator.services.mozilla.com/D56612

--HG--
extra : moz-landing-system : lando
2019-12-12 00:49:40 +00:00
Doug Thayer
86601b48c5 Bug 1602646 - Remove vestigial references to cooperative scheduling r=froydnj
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.

Rebased across https://hg.mozilla.org/mozilla-central/rev/3f0b4e206853
by Karl Tomlinson <karlt+@karlt.net>.

Differential Revision: https://phabricator.services.mozilla.com/D41247

--HG--
extra : moz-landing-system : lando
2019-12-12 00:56:53 +00:00
Kristen Wright
89819fb253 Bug 1602167 - Make TaskQueue capable of retaining its dispatch flags r=froydnj
Makes TaskQueue's queue hold a struct with each runnable and its flags. When specified, flags will be stored and passed with NS_DISPATCH_AT_END when TaskQueue::Runner dispatches itself back to its event target.

Differential Revision: https://phabricator.services.mozilla.com/D56802

--HG--
extra : moz-landing-system : lando
2019-12-11 22:26:06 +00:00
Simon Giesecke
fec8c64d2a Bug 1602452 - Make member functions of nsTStringRepr defined in header constexpr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D56369

--HG--
extra : moz-landing-system : lando
2019-12-10 08:40:48 +00:00
Karl Tomlinson
bd2fb4e16f Bug 1599922 clear PRThread references before the PRThread is deleted r=froydnj
Virtual thread references are used for IsOnCurrentThread(), which would
spuriously return true when the dangling pointer happened to match that of a
new PRThread.

Differential Revision: https://phabricator.services.mozilla.com/D55765

--HG--
extra : moz-landing-system : lando
2019-12-09 14:47:47 +00:00
Mihai Alexandru Michis
f995448544 Backed out changeset bf906a905a26 (bug 1602452) for causing bustages in gtest/TestStrings.cpp
CLOSED TREE
2019-12-09 17:41:25 +02:00
Simon Giesecke
50cf008dd3 Bug 1602452 - Make member functions of nsTStringRepr defined in header constexpr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D56369

--HG--
extra : moz-landing-system : lando
2019-12-09 15:01:22 +00:00
Daniel Varga
6e13799734 Backed out changeset e65c1bcb013f (bug 1601475) for causing build bustage. On a CLOSED TREE 2019-12-09 12:51:07 +02:00
Tyler
103588ae45 Bug 1601475 - Remove ImageContentLoaded event and ImageDocumentLoaded message handling code across the tree r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D56051

--HG--
extra : moz-landing-system : lando
2019-12-09 10:18:25 +00:00
Cameron McCormack
80142a59ab Bug 1571285 - Correctly style dark scrollbars in tree components. r=emilio
We need to ensure the rules that override all properties for scrollbar
part elements only apply to those that are NAC (and so will be eligible
for NAC style sharing).  We have some uses of non-NAC <scrollbar>
elements that should continue to inherit properties from their parents.

To avoid any changes in rule matching order that come with changing specificity,
we add a new :-moz-native-anonymous-no-specificity pseudo-class.

While we're here, we note :-moz-native-anonymous-no-specificity (and the
regular :-moz-native-anonymous pseudo-class) as not needing style
sharing cache revalidation, as we never share NAC styles.

Differential Revision: https://phabricator.services.mozilla.com/D56154

--HG--
extra : moz-landing-system : lando
2019-12-09 03:16:03 +00:00
Gabriele Svelto
5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Gabriele Svelto
ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Mike Hommey
6a1d6c2698 Bug 1587468 - Update uuid to 0.8.1. r=webdriver-reviewers,whimboo,emilio
This leaves one out-of-tree of uuid 0.7, handled by https://github.com/mozilla/rkv/pull/184
(but we have two copies of that, we'd need to have it landed on both
branches and pulled).

Differential Revision: https://phabricator.services.mozilla.com/D55912

--HG--
extra : moz-landing-system : lando
2019-12-06 00:47:50 +00:00
Thinker Li
7cfdf6a788 Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

Differential Revision: https://phabricator.services.mozilla.com/D46884

--HG--
extra : moz-landing-system : lando
2019-12-05 00:02:40 +00:00
Thinker Li
0fcab03d24 Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878

--HG--
extra : moz-landing-system : lando
2019-12-05 00:03:29 +00:00
Nathan Froyd
e5e0366a02 Bug 1592738 - update xpcom_macros to more recent proc_macro et al; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D51162

--HG--
extra : moz-landing-system : lando
2019-12-03 22:49:04 +00:00
Bogdan Tara
3732e1f17c Backed out 6 changesets (bug 1470591) for test_punycodeURIs & test_nsIProcess* crashes CLOSED TREE
Backed out changeset 3ca19f8f388e (bug 1470591)
Backed out changeset f80db6e63169 (bug 1470591)
Backed out changeset cbac2d7dfe42 (bug 1470591)
Backed out changeset daad4d736ec0 (bug 1470591)
Backed out changeset ca1b804d404a (bug 1470591)
Backed out changeset a10772f780f7 (bug 1470591)
2019-12-04 00:53:14 +02:00
Thinker Li
035717ac2d Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

Differential Revision: https://phabricator.services.mozilla.com/D46884

--HG--
extra : moz-landing-system : lando
2019-12-03 19:08:10 +00:00
Thinker Li
70ef2f4abf Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878

--HG--
extra : moz-landing-system : lando
2019-12-03 18:53:53 +00:00
Kershaw Chang
f3bddbd52b Bug 1596409 - P1.1: Make socket process support IPCStream r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D54289

--HG--
extra : moz-landing-system : lando
2019-12-03 13:41:58 +00:00
Andrew McCreight
a102cb7648 Bug 1599521 - Add helper method for getting a string for the current process type. r=froydnj
I also removed the unused forward declaration of GMPLoader. It used to
be needed for the declaration of XRE_InitChildProcess.

Differential Revision: https://phabricator.services.mozilla.com/D54819

--HG--
extra : moz-landing-system : lando
2019-12-02 22:01:47 +00:00
Boris Zbarsky
d9695ff145 Bug 1600719. Add some sanity-checking for redundant can_run_script annotations on XPIDL attributes. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D55529

--HG--
extra : moz-landing-system : lando
2019-12-02 19:52:11 +00:00
Boris Zbarsky
083b367e51 Bug 1599963. Allow annotating xpidl getters and setters indepdendently in terms of whether they can run script. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D55065

--HG--
extra : moz-landing-system : lando
2019-12-02 18:50:15 +00:00
Noemi Erli
79b3b21bb6 Merge autoland to mozilla-central. a=merge 2019-12-02 20:41:12 +02:00
ffxbld
2eb3b6566d Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2019-12-02 11:59:11 +00:00
Emilio Cobos Álvarez
d11fea7f89 Bug 1599614 - nsDirectoryService::SetCurrentProcessDirectory is infallible. r=froydnj
Depends on D54829

Differential Revision: https://phabricator.services.mozilla.com/D54830

--HG--
extra : moz-landing-system : lando
2019-12-02 13:56:14 +00:00
Emilio Cobos Álvarez
5ec30de90e No bug - Fixup a comment in nsMemoryImpl.
Follow-up to D54829.

Differential Revision: https://phabricator.services.mozilla.com/D55032

--HG--
extra : moz-landing-system : lando
2019-11-27 22:06:46 +00:00