Commit Graph

187 Commits

Author SHA1 Message Date
Toshihito Kikuchi
96461a9f97 Bug 1706501 - Make CommandLineParserWin::HandleCommandLine take nsTSubstring. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D113060
2021-04-27 18:20:51 +00:00
Thomas Kluyver
729862f1ad Bug 1705130 - Correct argument type in D-Bus introspection XML. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D112056
2021-04-15 08:28:43 +00:00
Simon Giesecke
760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Jan Alexander Steffens (heftig)
4920407bb3 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-11 14:32:53 +00:00
Narcis Beleuzu
198358fc15 Backed out changeset a4f4f640eaa7 (bug 1696845) for bustages on pangofc-fontmap.h 2021-03-10 04:49:51 +02:00
Jan Alexander Steffens (heftig)
1261a74d17 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-09 22:55:47 +00:00
Michael Hofmann
99540873a3 Bug 1684365 - Add a null pointer check so that Firefox won't crash when it can't initialize mRemoteServer r=stransky
Firefox 84.0.1 crashes under Gentoo Linux if it is started in
Wayland mode and if it was compiled WITH Wayland support and
WITHOUT dbus support.

I traced down the problem to line 172 of
toolkit/components/remote/nsRemoteService.cpp:

   nsresult rv = mRemoteServer->Startup(mProgram.get(), mProfile.get());

mRemoteServer is NULL and Firefox crashes.

This patch adds a NULL pointer check before that line.

See:
- Mozilla's Bugzilla, bug 1684365
- https://bugs.gentoo.org/762035
- https://forums.gentoo.org/viewtopic-t-1126235.html

Differential Revision: https://phabricator.services.mozilla.com/D101536
2021-01-25 09:29:42 +00:00
Kartik Gautam
7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Cosmin Sabou
2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam
775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Masatoshi Kimura
caa8a261a4 Bug 1684110 - Stop using some 'A'-functions in toolkit/components/remote/. r=tkikuchi
Depends on D100467

Differential Revision: https://phabricator.services.mozilla.com/D100468
2020-12-27 08:40:36 +00:00
stransky
59ba64b037 Bug 1672173 [Linux] Fix malformed DBUS introspection, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D99360
2020-12-10 16:10:08 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
50762dacab Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Simon Giesecke
cfd7d0ea9c Bug 1659923 - Avoid unnecessary copies around Base64Encode. r=xpcom-reviewers,necko-reviewers,froydnj,valentin
This also adds some more variants of Base64Encode and Base64EncodeAppend.

Differential Revision: https://phabricator.services.mozilla.com/D87559
2020-08-19 17:45:16 +00:00
Toshihito Kikuchi
30b7f20b67 Bug 1650637 - Part3: Introduce WinRemoteMessageSender/Receiver. r=mossop
This patch introduces two classes WinRemoteMessageSender/Receiver to
generate/parse a payload of WM_COPYDATA message which is sent from
nsWinRemoteClient to nsWinRemoteServer.

And, we change the encoding of the payload from utf-8 to utf-16,
incrementing the message version from 1 to 2, because our parsing
logic on nsWinRemoteServer does not support a variable-width character
encoding like utf-8.

Differential Revision: https://phabricator.services.mozilla.com/D84228
2020-07-30 00:26:40 +00:00
Toshihito Kikuchi
e08d50175e Bug 1650637 - Part2: Move CommandLineParserWin to toolkit/xre/. r=mossop
This patch just moves the CommandLineParserWin class to toolkit/xre/
without any change and adds a unittest for it.

Depends on D84226

Differential Revision: https://phabricator.services.mozilla.com/D84227
2020-07-30 00:26:27 +00:00
Toshihito Kikuchi
b430dfd8e5 Bug 1650637 - Part1: Split HandleCommandLine into CommandLineParserWin and nsCommandLine. r=mossop
This patch takes our the logic to parse a command line string as a new template
class `CommandLineParserWin` from `HandleCommandLine` to prepare to convert it
into the utf-16 version.

Differential Revision: https://phabricator.services.mozilla.com/D84226
2020-07-30 00:26:20 +00:00
Martin Stransky
cc642ad9c0 Bug 1239694 Implemenet Gnome search provider, r=jhorak,mak
Implement org.gnome.Shell.SearchProvider2 D-Bus interface and enable it when
widget.gnome-search-provider.enabled pref is set, so this feature is disabled
by default.

Differential Revision: https://phabricator.services.mozilla.com/D69181
2020-04-29 18:02:23 +00:00
Bogdan Tara
5f9254f771 Backed out changeset cee5051ad409 (bug 1239694) for bustages complaining about dbus CLOSED TREE 2020-04-29 14:17:16 +03:00
Martin Stransky
67042242cd Bug 1239694 Implemenet Gnome search provider, r=jhorak,mak
Implement org.gnome.Shell.SearchProvider2 D-Bus interface and enable it when
widget.gnome-search-provider.enabled pref is set, so this feature is disabled
by default.

Differential Revision: https://phabricator.services.mozilla.com/D69181
2020-04-29 10:50:10 +00:00
Simon Giesecke
8ad76c7e47 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in toolkit. r=mossop
Depends on D66008

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

--HG--
extra : moz-landing-system : lando
2020-03-10 08:48:24 +00:00
Eric Rahm
b224a7461c Bug 1617334 - Remove nsAutoPtr usage from toolkit. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D63746

--HG--
extra : moz-landing-system : lando
2020-02-22 14:50:52 +00:00
Martin Stransky
b420323493 Bug 1609134 Provide MOZ_DBUS_REMOTE env variable to use DBUS remote exclusively, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D59872

--HG--
extra : moz-landing-system : lando
2020-01-16 10:48:46 +00:00
Martin Stransky
3f53c06229 Bug 1551664 [Wayland] Validate app name and check dbus path for remote client, r=heftig
Depends on D59863

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

--HG--
extra : moz-landing-system : lando
2020-01-15 11:17:42 +00:00
Martin Stransky
84f52d32f1 Bug 1551664 [Wayland] Validate app name and check dbus path for remote server, r=heftig
Differential Revision: https://phabricator.services.mozilla.com/D59863

--HG--
extra : moz-landing-system : lando
2020-01-15 11:17:40 +00:00
Yuri
9da62d84ad Bug 1565597 - Mozilla Remoting implementation for macOS, r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D56997

--HG--
extra : moz-landing-system : lando
2019-12-13 09:20:24 +00:00
Noemi Erli
83cbb9fb14 Backed out changeset 7c1213a74d28 (bug 1565597) for causing Linux bustages in RemoteUtils.h CLOSED TREE 2019-12-13 00:53:33 +02:00
Yuri
0514078c54 Bug 1565597 - Mozilla Remoting implementation for macOS, r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D56997

--HG--
extra : moz-landing-system : lando
2019-12-12 22:40:10 +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
Jed Davis
c8b77dbe74 Bug 1545504 - Use poll() instead of select() on the X11 socket. r=stransky
These are single-fd polls of the X server socket, which in practice will
be much smaller than FD_SETSIZE, but it's cleaner to just not have the
fixed-size array in the first place.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 10:09:35 +00:00
Mike Hommey
66d7fe943e Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:42 +00:00
Dave Townsend
cf20f54068 Bug 1553781: When the remote service finds an instance to remote to it doesn't clean up the startup lock. r=glandium
This fixes the issue in a few redundant ways:
* nsProfileLock is made to properly clean itself up when destroyed.
* nsRemoteService makes sure the unlock when destroyed.
* nsAppRunner unlocks when a remote client has been found.

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

--HG--
extra : moz-landing-system : lando
2019-05-30 17:53:36 +00:00
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Liang-Heng Chen
2cb34bb8bf Bug 1539641 - Log and report storage access granted reason; r=Ehsan,chutten
Differential Revision: https://phabricator.services.mozilla.com/D26720

--HG--
extra : moz-landing-system : lando
2019-04-12 00:38:57 +00:00
Mats Palmgren
f46136021c Bug 288704 part 1 - [css-lists] Add an inherited internal UA sheet property (-moz-list-reversed:true|false) to propagate <ol reversed> to its relevant decendants. r=emilio 2019-03-24 23:13:52 +01:00
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Dave Townsend
4c063a43a7 Bug 1533708: Properly shut down the remote service before launching Firefox again. r=jmathies
The main changes here are to stop checking if we're shutting down when we
already know we are shutting down and making sure the windows remote server
shuts down properly.

I also spotted that nsINativeAppSupport.quit is now unused so I removed it.

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

--HG--
extra : moz-landing-system : lando
2019-03-11 14:58:08 +00:00
Dave Townsend
e7f3517b8a Bug 1518639: Implement windows remoting server and client. r=jimm
Implements the windows remove client and server based on the current remoting
code in nsNativeAppSupportWin.cpp. Makes the hidden window classname encode both
program name and profile name. nsNativeAppSupportWin is now just used for
setting up the console.

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

--HG--
extra : source : 84e8066625fd72fdb1eb6eab85621ae842fe91b4
extra : amend_source : b698f986cce0ccfae29c04fcbe0d84a6c8605ab6
2019-02-06 14:18:35 -08:00
Dave Townsend
3a2c94b730 Bug 1518639: Add boilerplate support for a windows remote client and server. r=jimm,froydnj
Adds build config and stubs for a windows implementation of the remote client
and server.

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

--HG--
extra : source : abd7789e9637c92978efcf745361b98c5abf847a
extra : intermediate-source : 276ca640adc8ff16ff3ff7252e8aa5016205b1e0
2019-02-06 11:09:06 -08:00
Dave Townsend
cb70130abf Bug 1518639: Move remote client call to after we have a profile. r=jimm
Makes it so we always know which profile we want to remote the command line to.

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

--HG--
extra : source : f1f569797e33b390ba588351e826fa979b018f01
extra : intermediate-source : 967993505a3d00a79cd81dccf66ffa0612a58ad4
2019-01-31 17:06:00 -08:00
Dave Townsend
fa738deba6 Bug 1518639: Move command line handing to nsRemoteService. r=jimm
Makes nsRemoteService handle the command line parsing, though this will end up
being removed in a later patch.

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

--HG--
extra : source : 5c648e7641a72770d89a5408ac01de3b5de15c6b
extra : intermediate-source : fc466857ab39e3d2371f13ddae553c921fb727d2
2019-01-31 12:13:34 -08:00
Dave Townsend
ca092a734d Bug 1518639: Move startup locking to the remote service. r=jimm
Makes nsRemoteService responsible for the shared lock for the time between
attempting to contact a remote server and starting up our own server.

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

--HG--
extra : source : 4da03e7a957c180d5997e3d8f6903b22f9a800c4
extra : intermediate-source : 28404f97bb22b726afee8df04184da81138497a2
2019-01-31 12:13:34 -08:00
Dave Townsend
39e0721777 Bug 1518639: Move the calls to the remote clients into nsRemoteService. r=jimm
Makes nsRemoteService responsible for managing the clients too, simplifying
nsAppRunner.

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

--HG--
extra : source : 1ca2a56746a32219cc65015632c19a5856023e45
extra : intermediate-source : 5373c5bb9ad5bb7c3af1cae390c3612be51176b5
2019-01-31 12:13:34 -08:00
Dave Townsend
04952df927 Bug 1518639: Move widget/xremote code to toolkit/components/remote. r=jimm
It makes more sense for the remote client to live alongside the server.

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

--HG--
rename : widget/xremoteclient/RemoteUtils.cpp => toolkit/components/remote/RemoteUtils.cpp
rename : widget/xremoteclient/RemoteUtils.h => toolkit/components/remote/RemoteUtils.h
rename : widget/xremoteclient/DBusRemoteClient.cpp => toolkit/components/remote/nsDBusRemoteClient.cpp
rename : widget/xremoteclient/DBusRemoteClient.h => toolkit/components/remote/nsDBusRemoteClient.h
rename : widget/xremoteclient/nsRemoteClient.h => toolkit/components/remote/nsRemoteClient.h
rename : widget/xremoteclient/XRemoteClient.cpp => toolkit/components/remote/nsXRemoteClient.cpp
rename : widget/xremoteclient/XRemoteClient.h => toolkit/components/remote/nsXRemoteClient.h
extra : source : c3c13b550b675b488bdde389035a13c85eee947d
extra : intermediate-source : a7490cdfb635f95c1eb8c33283064842bc490cbd
2019-01-31 12:13:34 -08:00
Dave Townsend
cf1d75b45d Bug 1518639: Break out the remote server pieces from nsRemoteService and deCOMtaminate. r=jimm
This code is only ever used from c++ so does not need to be an XPCOM component.
Broken out a single nsRemoteService that is responsible for choosing the server
implementation to use.

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

--HG--
rename : toolkit/components/remote/nsDBusRemoteService.cpp => toolkit/components/remote/nsDBusRemoteServer.cpp
rename : toolkit/components/remote/nsDBusRemoteService.h => toolkit/components/remote/nsDBusRemoteServer.h
rename : toolkit/components/remote/nsGTKRemoteService.cpp => toolkit/components/remote/nsGTKRemoteServer.cpp
rename : toolkit/components/remote/nsGTKRemoteService.h => toolkit/components/remote/nsGTKRemoteServer.h
rename : toolkit/components/remote/nsXRemoteService.cpp => toolkit/components/remote/nsXRemoteServer.cpp
rename : toolkit/components/remote/nsXRemoteService.h => toolkit/components/remote/nsXRemoteServer.h
extra : source : 28c7186745e3d5de5f44a72a81e0068cb23ce547
2019-02-27 15:45:51 -08:00