Commit Graph

1398 Commits

Author SHA1 Message Date
Dorel Luca
8cc61e1d4b Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
8cc3e9bf3f Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217
2020-01-18 13:16:39 +00:00
Zibi Braniecki
3db43c6b8d Bug 1609585 - Migrate all possible uses from AppLocalesAsLangTag(s) to AppLocale(s)AsBCP47. r=marionette-reviewers,jfkthame,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D60096
2020-01-17 19:29:09 +00:00
James Willcox
3fc69db9bb Bug 1542579 - Use the Android app name as the Gecko app name r=geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D59530
2020-01-14 20:14:59 +00:00
Andrew McCreight
aa742fffe5 Bug 1607703 - Initialize the JS context if -reset-profile is set and -migration is not. r=froydnj
ProfileResetCleanup ends up opening a browser window and doing browser
things, so it needs the JS context to be initialized. Migration does
that, so if you do both then things are fine. But if you just pass in
-reset-profile and not -migration then you end up crashing
immediately. This patch just checks for that case and initializes the
context.

Differential Revision: https://phabricator.services.mozilla.com/D59810
2020-01-13 23:02:57 +00:00
Ben Iofel
0c9e6cc044 Bug 726479 - Use GTK's support for startup notifications, r=karlt
Original author: Ben Iofel <iofelben@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D58594
2020-01-06 12:03:38 +00:00
Emma Malysz
ba6b2f0a9b Bug 1601093, Rename the remaining .xul files to .xhtml in toolkit/ r=marionette-reviewers,mossop,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D55857
2019-12-11 17:44:54 +00:00
Gurzau Raul
c2d189a7a6 Backed out changeset dd809e835f2a (bug 1601093) for eslint failures at alert.xhtml and commonDialog.xhtml on a CLOSED TREE. 2019-12-11 19:27:28 +02:00
Emma Malysz
abfeb3aaa3 Bug 1601093, Rename the remaining .xul files to .xhtml in toolkit/ r=marionette-reviewers,mossop,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D55857
2019-12-11 17:02:20 +00:00
Aaron Klotz
e5879720df Bug 1522830: Part 8 - Update UntrustedModulesProcessor to support processing child processes; r=mhowell
This patch contains the core changes to make this all work across e10s:

* We clarify the naming of path variables to be more specific as to whether they are NT paths or DOS paths;
* We add IPC `ParamTraits` that are necessary for `UntrustedModulesData` types;
* We implement `ProcessModuleLoadQueue` for child processes. Because of sandboxing, we need to split this sequence into multiple async operations:
  ** Initial queue processing;
  ** Sending the list of modules to the parent process to determine trustworthiness (via `GetModulesTrust`);
  ** Receiving the results from the parent process and producing a final result (via `CompleteProcessing`).
* We implement the `GetModulesTrust` function for the parent process, which evaluates the trust of child process modules;
* We change all hash tables to be keyed using NT paths. Because resolving DOS paths may not be permitted in sandboxed processes,
  we need to standardize on NT paths as the "universal path" across processes.
* We add `WinDllServices::StartUntrustedModulesProcessor` to separate untrusted modules startup from `WinDllServices` construction:
  ** While we now start `WinDllServices` across all child process types, only specific process types will support untrusted modules.
  ** Furthermore, untrusted modules must be started at a very specific point that is dependent on the type of child process.
  ** We add those calls to `StartUntrustedModulesProcessor` in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D53680
2019-12-06 22:06:26 +00:00
Gabriele Svelto
f03cdb2b2d 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
2019-12-06 09:17:57 +00:00
Gabriele Svelto
eb403b8785 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
2019-12-06 09:24:56 +00:00
shindli
477dfbf824 Backed out 13 changesets (bug 1522830) for causing xpc shell failures in test_ThirdPartyModulesPing.js CLOSED TREE
Backed out changeset a3e44bbc9ce3 (bug 1522830)
Backed out changeset 11078767a246 (bug 1522830)
Backed out changeset c7ee156830cf (bug 1522830)
Backed out changeset 810f0cb2308d (bug 1522830)
Backed out changeset f8ab75219387 (bug 1522830)
Backed out changeset ec293f9a5e32 (bug 1522830)
Backed out changeset 4bfc013c3d79 (bug 1522830)
Backed out changeset f4ae67f2f231 (bug 1522830)
Backed out changeset 2737350b7d40 (bug 1522830)
Backed out changeset 52931597c652 (bug 1522830)
Backed out changeset bc8985a34539 (bug 1522830)
Backed out changeset 09cbbbc5c802 (bug 1522830)
Backed out changeset d5e366ea4657 (bug 1522830)
2019-12-06 02:07:16 +02:00
Aaron Klotz
520ccce44c Bug 1522830: Part 8 - Update UntrustedModulesProcessor to support processing child processes; r=mhowell
This patch contains the core changes to make this all work across e10s:

* We clarify the naming of path variables to be more specific as to whether they are NT paths or DOS paths;
* We add IPC `ParamTraits` that are necessary for `UntrustedModulesData` types;
* We implement `ProcessModuleLoadQueue` for child processes. Because of sandboxing, we need to split this sequence into multiple async operations:
  ** Initial queue processing;
  ** Sending the list of modules to the parent process to determine trustworthiness (via `GetModulesTrust`);
  ** Receiving the results from the parent process and producing a final result (via `CompleteProcessing`).
* We implement the `GetModulesTrust` function for the parent process, which evaluates the trust of child process modules;
* We change all hash tables to be keyed using NT paths. Because resolving DOS paths may not be permitted in sandboxed processes,
  we need to standardize on NT paths as the "universal path" across processes.
* We add `WinDllServices::StartUntrustedModulesProcessor` to separate untrusted modules startup from `WinDllServices` construction:
  ** While we now start `WinDllServices` across all child process types, only specific process types will support untrusted modules.
  ** Furthermore, untrusted modules must be started at a very specific point that is dependent on the type of child process.
  ** We add those calls to `StartUntrustedModulesProcessor` in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D53680
2019-12-05 21:57:29 +00:00
Daniel Harris
d934472bae Bug 1600554 Removed nested redundant #if r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D55925
2019-12-05 13:22:38 +00:00
Thinker Li
578da14f9c Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878
2019-12-05 00:03:29 +00:00
Bogdan Tara
d189c284d3 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
98defa3bcd Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878
2019-12-03 18:53:53 +00:00
Andrew McCreight
a520969016 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
2019-12-02 22:01:47 +00:00
Jan de Mooij
844ff93d3b Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D51061
2019-11-22 12:40:17 +00:00
Mike Hommey
98893714d1 Bug 1594998 - Make standalone SpiderMonkey use libxul-like panic. r=froydnj
This moves the parts of toolkit/library/rust/shared/lib.rs related to
panic hooking to a new mozglue subdirectory, which will be used for
things that can be statically linked to e.g. libxul, rather than in
a "shared library".

The panic hook is disabled when building spidermonkey via the mozjs_sys
crate.

Differential Revision: https://phabricator.services.mozilla.com/D52793
2019-11-15 13:14:42 +00:00
Ciure Andrei
aa0103ad65 Backed out changeset 7a28c229e654 (bug 1594998) for causing bustages CLOSED TREE 2019-11-15 03:26:34 +02:00
Mike Hommey
c0d6293d19 Bug 1594998 - Make standalone SpiderMonkey use libxul-like panic. r=froydnj
This moves the parts of toolkit/library/rust/shared/lib.rs related to
panic hooking to a new mozglue subdirectory, which will be used for
things that can be statically linked to e.g. libxul, rather than in
a "shared library".

The panic hook is disabled when building spidermonkey via the mozjs_sys
crate.

Differential Revision: https://phabricator.services.mozilla.com/D52793
2019-11-15 00:21:32 +00:00
Gurzau Raul
f2c7bc43de Backed out changeset 4cf8f3f89042 (bug 1594998) for xpcshell failures at test_crash_rust_panic.js on a CLOSED TREE. 2019-11-14 03:52:52 +02:00
Mike Hommey
f88b2c8a1f Bug 1594998 - Make standalone SpiderMonkey use libxul-like panic. r=froydnj,jandem
This moves the parts of toolkit/library/rust/shared/lib.rs related to
panic hooking to a new mozglue subdirectory, which will be used for
things that can be statically linked to e.g. libxul, rather than in
a "shared library".

The panic hook is disabled when building spidermonkey via the mozjs_sys
crate.

Differential Revision: https://phabricator.services.mozilla.com/D52793
2019-11-13 22:07:08 +00:00
Dorel Luca
b855dec17b Backed out changeset 955256297d6d (bug 1579367) for causing a top crash in Bug 1594404. a=backout 2019-11-06 23:19:09 +02:00
Jan de Mooij
0ee05182d2 Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D51061
2019-11-05 06:29:13 +00:00
Toshihito Kikuchi
ae759906dd Bug 1572788 - Make nsXULAppInfo::GetUserCanElevate reuse GetElevationType. r=aklotz
`nsXULAppInfo::GetUserCanElevate` can reuse `GetElevationType` and we can remove
`VistaTokenElevationType` definition.

Differential Revision: https://phabricator.services.mozilla.com/D49691
2019-10-28 14:53:42 +00:00
Emilio Cobos Álvarez
c3ca04d5da Bug 1589327 - Remove more dead code conditional on jni::IsFennec() or similar. r=snorp
Didn't want to remove all the WebAuthn and dynamic toolbar code so I left it
there in case it's useful in the future.

Differential Revision: https://phabricator.services.mozilla.com/D49588
2019-10-18 18:49:51 +00:00
Gabriele Svelto
652cb568da Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678
2019-09-30 22:06:47 +00:00
Henri Sivonen
c18206b0e8 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957
2019-09-18 08:26:34 +00:00
Christian Holler
f5fa235dc0 Bug 1556347 - Set MOZ_HEADLESS for gtests and headless fuzzing. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45246
2019-09-11 19:33:43 +00:00
Coroiu Cristina
a042722aad Backed out changeset 3ed264b9dc87 (bug 1556347) for Gtest failures at /build/src/toolkit/xre/nsAppRunner.cpp on a CLOSED TREE 2019-09-10 19:04:36 +03:00
Christian Holler
3406d4c926 Bug 1556347 - Set MOZ_HEADLESS for gtests and headless fuzzing. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45246
2019-09-10 15:26:39 +00:00
Gijs Kruitbosch
5e3580d4b2 Bug 1567848 - make XRE_IsE10sParentProcess always tell the truth on fennec, r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38907
2019-09-06 14:30:27 +00:00
Tom Ritter
3417fab73d Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961
2019-09-04 02:40:32 +00:00
Gijs Kruitbosch
3ce1b62f02 Bug 1577706 - move checks for -url from toolkit into browser code, and make osint sanitizer app-agnostic, r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D44395
2019-09-03 17:01:33 +00:00
Andreea Pavel
976e2c7dd0 Backed out changeset 316e6fc0e5c5 (bug 1577706) for build bustages on a CLOSED TREE 2019-09-03 18:29:19 +03:00
Gijs Kruitbosch
23c4aa8b51 Bug 1577706 - move checks for -url from toolkit into browser code, and make osint sanitizer app-agnostic, r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D44395
2019-09-03 15:10:51 +00:00
Toshihito Kikuchi
fd018ae284 Bug 1567219 - Add a metric to collect how many users launch a process with Admin but without UAC. r=aklotz
This patch adds a new Scalar metric `os.environment.is_admin_without_uac` that
indicates the process is lauched with Admin privileges when UAC is turned off.

Differential Revision: https://phabricator.services.mozilla.com/D42047
2019-08-28 02:17:49 +00:00
Brindusan Cristian
45f727eb39 Backed out changeset 7cb87169e4cf (bug 1567219) for xpcshell failures in marAppApplyUpdateAppBinInUseStageSuccessSvc_win.js. 2019-08-28 05:10:33 +03:00
Toshihito Kikuchi
a17b1e775b Bug 1567219 - Add a metric to collect how many users launch a process with Admin but without UAC. r=aklotz
This patch adds a new Scalar metric `os.environment.is_admin_without_uac` that
indicates the process is lauched with Admin privileges when UAC is turned off.

Differential Revision: https://phabricator.services.mozilla.com/D42047
2019-08-27 22:51:32 +00:00
Jan Varga
47583baa7b Bug 1563023 - Part 8: Ignore quota cache if the user loads the same profile in different builds; r=asuth
This patch adds support for quota cache invalidation if the profile is loaded in different builds.

Differential Revision: https://phabricator.services.mozilla.com/D39673
2019-08-25 00:45:19 +00:00
Gijs Kruitbosch
e7e43049e4 Bug 1572838 - ensure osint commandline args are passed appropriately, r=mhowell,mossop
Differential Revision: https://phabricator.services.mozilla.com/D42311
2019-08-20 19:51:34 +00:00
Jonathan Kew
5fabd1aedb Bug 1570556 - Remove call to pango_fc_font_map_shutdown, which was moved out of public headers in Pango 1.44. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D42127
2019-08-15 20:10:41 +00:00
Tom Schuster
0700472892 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 16:31:54 +00:00
Mihai Alexandru Michis
5a74ddfbef Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE
Backed out changeset e44c9fd81e5b (bug 1558915)
Backed out changeset 3da6e9e86be4 (bug 1558915)
2019-08-02 12:17:42 +03:00
Tom Schuster
b637c03f89 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 08:54:18 +00:00
Mihai Alexandru Michis
deb20274aa Backed out changeset 814a517bdf2e (bug 1567848) for causing xpcshell and geckoview failure CLOSED TREE 2019-07-23 18:46:34 +03:00
Gijs Kruitbosch
a99cc5bab4 Bug 1567848 - make XRE_IsE10sParentProcess always tell the truth on fennec, r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38907
2019-07-23 13:59:22 +00:00