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

197 Коммитов

Автор SHA1 Сообщение Дата
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Haik Aftandilian b1a4ba8dff Bug 1505445 - [Mac] With sandbox early startup, start the sandbox after the port exchange r=Alex_Gaynor
Don't start the sandbox until after the port exchange so the parent process does not have to wait longer in ContentParent::LaunchSubprocess() for the (expensive) sandbox_init_with_parameters call to complete in the child. Remove the policy rule allowing access to the parent port now that it is already open when the sandbox is initialized and therefore not needed.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 21:04:19 +00:00
Marco Castelluccio d8c93be4b4 Bug 1504188 - Don't include Sandbox.h and don't use EarlyStartMacSandboxIfEnabled if the sandbox is disabled. r=haik
--HG--
extra : rebase_source : 228e7ffdd20e622f05c5c52a82109c802d2498b9
2018-11-02 15:47:03 +01:00
Haik Aftandilian 81b56d13a8 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command line allowing for early sandbox startup.

Pref'd off behind "security.sandbox.content.mac.earlyinit" until it's ready to be enabled by default.

Once early startup is enabled by default and considered stable, the original sandbox startup code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-19 18:23:16 +00:00
Narcis Beleuzu a2990eb898 Backed out 7 changesets (bug 1431441) as per haik`s request.
Backed out changeset 1dfdc7ba998d (bug 1431441)
Backed out changeset fb1a4ddbf9bf (bug 1431441)
Backed out changeset b59b1651fc15 (bug 1431441)
Backed out changeset 1e2bb579b824 (bug 1431441)
Backed out changeset 2a635530dfa3 (bug 1431441)
Backed out changeset 262da0be2fed (bug 1431441)
Backed out changeset b9cfda58fed3 (bug 1431441)

--HG--
extra : rebase_source : 7baf60c49683b419c0603979b0dff3befb2fbaf0
2018-10-14 18:20:01 +03:00
Haik Aftandilian b9bdcdedb1 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-11 22:44:25 +00:00
Tiberius Oros 3edd9afbe3 Backed out 5 changesets (bug 1431441) for failing devtools at client/debugger/new/test/mochitest/browser_dbg_rr_breakpoints-01.js on OSX opt a=backout
Backed out changeset 94a1d1d67191 (bug 1431441)
Backed out changeset be7ec7438701 (bug 1431441)
Backed out changeset db6b7ee04187 (bug 1431441)
Backed out changeset f61ec0f140c2 (bug 1431441)
Backed out changeset ac51f86f5cac (bug 1431441)
2018-10-03 09:39:01 +03:00
Haik Aftandilian ef9150c083 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-02 20:29:46 +00:00
Carl Corcoran 7da8e04c87 Bug 1467736: Add support for DllBlocklist_Shutdown;r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D4544

--HG--
extra : moz-landing-system : lando
2018-08-29 18:49:49 +00:00
Aaron Klotz c7facf6946 Bug 1445025: Part 3 - Change blocklist init flags for browser process so that they can be modified by launcher process; r=mhowell 2018-06-05 15:21:51 -06:00
Cosmin Sabou 1cda6f4992 Backed out 6 changesets (bug 1445025) for browser chrome failures on browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset a1203eb4cee9 (bug 1445025)
Backed out changeset 64b003dceafb (bug 1445025)
Backed out changeset a6cff2b478da (bug 1445025)
Backed out changeset 4dbc7fbb3361 (bug 1445025)
Backed out changeset 1ad82650ca1c (bug 1445025)
Backed out changeset 5c63001e1ce6 (bug 1445025)

--HG--
rename : browser/app/winlauncher/LaunchUnelevated.cpp => browser/app/LaunchUnelevated.cpp
rename : browser/app/winlauncher/LaunchUnelevated.h => browser/app/LaunchUnelevated.h
rename : browser/app/winlauncher/LauncherProcessWin.cpp => browser/app/LauncherProcessWin.cpp
rename : browser/app/winlauncher/LauncherProcessWin.h => browser/app/LauncherProcessWin.h
rename : browser/app/winlauncher/ProcThreadAttributes.h => browser/app/ProcThreadAttributes.h
2018-06-07 12:09:22 +03:00
Aaron Klotz 163c625fbe Bug 1445025: Part 3 - Change blocklist init flags for browser process so that they can be modified by launcher process; r=mhowell
--HG--
extra : rebase_source : a30a994322570d65ba2f4d4fba97b99738e58c0b
2018-06-05 15:21:51 -06:00
Aaron Klotz 415cd5e05e Bug 1454745: Skeletal bootstrap process; r=mhowell 2018-04-17 13:48:21 -06:00
Dorel Luca 112cc1ff6b Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout
Backed out changeset a992887a6060 (bug 1430857)
Backed out changeset cc9b0ac5f66b (bug 1430857)
Backed out changeset 4bdd6d82f993 (bug 1430857)
2018-02-07 15:02:58 +02:00
Aaron Klotz 200eb77750 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : 3a5b4a6f0412311f0b9080a2b3b3a31e45d15b75
2018-01-30 14:23:10 -07:00
Mike Hommey 4fe7459180 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : ac7bb0d7766fce5b6325c34c2868b26eec594e18
2017-09-28 10:37:27 +09:00
Sebastian Hengst 1d5497084d Backed out changeset 582d112281f9 (bug 1403366) 2017-10-04 01:27:07 +02:00
Mike Hommey 3b34606aa6 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : ac7bb0d7766fce5b6325c34c2868b26eec594e18
2017-09-28 10:37:27 +09:00
Sebastian Hengst 006ae28b0a Backed out changeset 3eb67e350f38 (bug 1403366) 2017-09-29 17:19:46 +02:00
Mike Hommey 31399bfad2 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : f61fd84dcc801f84f4838d357c795ce07928a4e6
2017-09-28 10:37:27 +09:00
Marco Castelluccio c34f5eafdb Bug 1403218 - Remove no longer used XRE_DONT_SUPPORT_XPSP2 definition. r=glandium
--HG--
extra : rebase_source : 487c724a6a14a4c9b9ee6c0438eda64b0d3ab9ff
2017-09-26 17:48:26 +02:00
Bob Owen 01f2685a30 Bug 1377555 Part 1: Back out changesets 04edb03fb817 and d17ac655cc51. r=jimm
This backouts the previous change to detect and change the sandbox policy
when running from a network drive.
2017-07-11 09:44:20 +01:00
Bob Owen a3df44ccee Bug 1323188: Don't use restricting SIDs in the sandbox access tokens when running from a network drive. r=jimm 2017-06-07 20:20:02 +01:00
Aaron Klotz 831876bb4f Bug 1363844: Add CHILD_PROCESSES_ONLY flag to Windows DLL blocklist; r=dmajor
MozReview-Commit-ID: f9ej2Hp0DF
2017-05-11 15:50:10 -06:00
Tom Tromey 77629ac8ca Bug 1334301 - use MOZ_FORMAT_PRINTF in nsBrowserApp.cpp; r=froydnj
MozReview-Commit-ID: 7cukiF58ejS

--HG--
extra : rebase_source : 6b7c880c29e783460eea2d18e065401e6803172e
2017-05-02 08:52:49 -06:00
Benjamin Smedberg ac290e07e4 Bug 1332639 - Fix nsBrowserApp.cpp and related headers to compile without the external string API, r=glandium
MozReview-Commit-ID: CQjtpA2lxAM

--HG--
extra : rebase_source : ae92ab7141cba8f3db41d5130059d02866242ccd
2017-02-27 13:39:34 -05:00
David Parks 26437f4ecd Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.

--HG--
extra : rebase_source : 4d5637bcdbeae605b0b99e9192598d48f371b698
2017-02-14 15:08:40 -08:00
Sebastian Hengst 68e7240c0c Backed out changeset 71b9ac06a60a (bug 1284897) 2017-02-21 23:13:29 +01:00
David Parks 82eb0f3fdd Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.

--HG--
extra : rebase_source : e34e8b50101cc40ded26e80791052123b24c8243
extra : histedit_source : 69c9b2dc91546adbfdad03b5d43842809191ffb9
2017-02-14 15:08:40 -08:00
Phil Ringnalda 87ae1a50e4 Backed out 5 changesets (bug 1284897) for mozilla::SandboxPermissions::RemovePermissionsForProcess crashes
Backed out changeset 19b2fcee13a9 (bug 1284897)
Backed out changeset a5171791437f (bug 1284897)
Backed out changeset 3ea8b8a18515 (bug 1284897)
Backed out changeset 21497a4e3bde (bug 1284897)
Backed out changeset 12e17d5f0fa9 (bug 1284897)
2017-02-16 22:14:15 -08:00
David Parks e9bcaf4cbe Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.
2017-02-14 15:08:40 -08:00
Mike Hommey 9a71407b51 Bug 1332523 - Add BinaryPath::Get variant that returns a UniquePtr instead of filling a stack buffer. r=bsmedberg
--HG--
extra : rebase_source : 3fd502f67bd28e504f9a5d1a6ea1e790e9fec774
2017-01-13 09:40:54 +09:00
Mike Hommey 45bb38d482 Bug 1332523 - Make GetBootstrap take the path to an arbitrary file next to libxul. r=bsmedberg
The FileExists check can be removed because the code loading the library
will handle that case already.

--HG--
extra : rebase_source : bac53d3f88ed1dd716ee1340d40dae42becdfdf0
2017-01-13 09:27:39 +09:00
Mike Hommey 11a4734e0d Bug 1332523 - Remove nsXPCOMGlue.h. r=bsmedberg
--HG--
extra : rebase_source : 7a0b2441f768cbdef1a5b51139f8ecd4a6fde0c1
2017-01-13 07:56:05 +09:00
Mike Hommey 9d2b3754b7 Bug 1332523 - Move message indicating when the blocklist is initialized after user32.dll was loaded to the blocklist itself. r=dmajor
--HG--
extra : rebase_source : 4aea579104d2bad56a91f67e66d0af8c4ada9c3d
2017-01-12 11:13:40 +09:00
Mike Hommey 7523430127 Bug 1330533 - Use FuzzerDriver directly instead of wrapping it in a libfuzzer_main function. r=decoder
Going further from the previous changes, all libfuzzer_main really does
is call the init function, and then proceed to call the fuzzer driver
with the testing function.

So instead of calling that function for it to do all that, the
LibFuzzerRunner can just call the init function itself, and then
call the fuzzer driver with the testing function.

--HG--
extra : rebase_source : 2eb1a2ae763ef21827471cd32addceacefc1ac5d
2017-01-12 14:44:18 +09:00
Mike Hommey cc6c5d8f71 Bug 1330533 - Pass LibFuzzerInitFunc and LibFuzzerTestingFunc to libfuzzer_main. r=decoder
The LibFuzzerRunner code lives in libxul. It's unnecessary complications
to have it call back a function in the firefox executable just so that
it calls another function that is in libxul. Passing the init and
testing functions to the libfuzzer_main function allows to just bypass
that roundtrip, simplifying the setup.

--HG--
extra : rebase_source : ba72c029a904e05fe3b0ed5984c1bad946b73c6a
2017-01-12 14:50:14 +09:00
Mike Hommey 92c5bff388 Bug 1330533 - Remove argc/argv arguments to XRE_LibFuzzerSetMain. r=decoder
The function given to XRE_LibFuzzerSetMain is called from somewhere that
does have access to argc/argv already, so we can avoid passing them
to XRE_LibFuzzerSetMain.

This actually might fix subtle issues with argc/argv not really matching
reality when calling the LibFuzzerMain function in the current code:
some arguments are handled before the call, and both argc and argv are
modified from within XRE_main, but the values stored for the
LibFuzzerMain call still are the original ones.

Argv being a pointer, and it not being reallocated, the value stored for
the LibFuzzerMain call points to the changed one, but argc, being an
integer, is not modified accordingly.

In fact, it's actually worse, because while the Gecko code doesn't
reallocate argv, gtk_main might. So if some GTK flag is passed on the
command line, there's also a possibility that the LibFuzzerMain function
will do a use-after-free.

So all in all, it's just better to use the set of modified argc/argv
from XRE_main instead of storing them from main().

--HG--
extra : rebase_source : 92b89909eab0fc2f67ce372b959bb0e3ed12cd2b
2017-01-12 11:59:37 +09:00
Mike Hommey 2330dcf840 Bug 1306327 - Move reading application.ini to XRE_main. r=bsmedberg
Reading application.ini involves using nsCOMPtr<nsIFile>, and that can
only happen through the XPCOM glue, which we eventually want to get rid
of.

So, while keeping the command line argument/environment variable
handling in nsBrowserApp, we move the actually parsing of the file to
XRE_main, where things can be handled without the XPCOM glue.

--HG--
extra : rebase_source : 487960a671476d4edae4f568c37efa6563ef4dff
2017-01-10 16:43:23 +09:00
Mike Hommey 09dc362a61 Bug 1306327 - Use the new XRE Bootstrap API in Desktop Firefox. r=bsmedberg
This just wraps all the XRE method calls to go through the Bootstrap API
instead of relying on the XPCOM glue methods.

--HG--
extra : rebase_source : eccbe18b9b21ca1ab6c403515ffd60f0a9174d9c
2016-12-16 11:10:02 +09:00
Mike Hommey 17436e8731 Bug 1306327 - Remove NS_XRE_DLL_BLOCKLIST_ENABLED. r=bsmedberg
Instead of having nsBrowserApp.cpp set a flag in XREAppData to indicate
whether the DLL blocklist properly initialized, just have XRE code ask
the blocklist itself.

--HG--
extra : rebase_source : e872853481acce68b325909e476d009aec878701
2017-01-10 09:10:36 +09:00
Mike Hommey af19e1f051 Bug 1306327 - Remove the flags argument to XRE_main. r=bsmedberg
This hasn't been used since the removal of the Metro code in bug
1039866, close to two years ago.

--HG--
extra : rebase_source : 58ec1ce63e4231c8006cafd3424675f14ddbf9f1
2017-01-10 14:15:50 +09:00
Mike Hommey f6f8d88483 Bug 1306327 - Don't set XREAppData.xreDirectory from nsBrowserApp.cpp. r=bsmedberg
It turns out nsAppRunner.cpp sets it to the exact same thing when it's
not already set, so we might as well use that.

--HG--
extra : rebase_source : cb8955e75c13a02494f3e163089c53696a661aa9
2017-01-10 08:02:43 +09:00
Mike Hommey a92655a398 Bug 1306327 - Remove XPCOMGlueEnablePreload. r=froydnj
Back in bug 632404, when the function was added, preloading was
conditional. But after some A/B testing, the conclusion in bug 771745
was that we would just do preloading unconditionally.

Which means in practice, we don't need to have a function to enable it
manually anymore, since we're always enabling it.

--HG--
extra : rebase_source : c76307c13c057e87e1fe4564b82113fbfa20d382
2016-12-15 17:37:53 +09:00
Jed Davis c3255cccdd Bug 1277968 - Use `firefox -contentproc` on sandbox-enabled Linux. r=ted
MozReview-Commit-ID: 7izy7UvJpwS

--HG--
extra : rebase_source : 9f1fc09f5e814360d3a6154eea7860b15ffdd51d
2016-11-08 15:06:36 -07:00
Benjamin Smedberg ae824ee296 Bug 1321593 part B - Unify the startup path between `firefox --app` and normal Firefox startup. With fixup to properly release/not-leak xreDirectory r=glandium
--HG--
extra : source : e531af57cd60ba243721c90fc30fa47d6bdd37e0
extra : histedit_source : ec9153f5d1b61d960e9e39a4fa3eebc156fc83ae%2C265903daf485c9ce34d60e284e51701c6e72ef16
2016-12-13 09:15:31 -05:00
Benjamin Smedberg d37894f60d Bug 1321593 part A - Refactor nsXREAppData: 1) make nsXREAppData strongly own its members 2) rename it to mozilla::XREAppData 3) separate out the static compiled data into StaticXREAppData 4) Remove XRE_CreateAppData and XRE_FreeAppData 5) remove the struct size and related size-checking code which was only ever useful for cross-version compatibility, r=glandium
MozReview-Commit-ID: CQv1UrSaw4D

--HG--
rename : xpcom/build/nsXREAppData.h => xpcom/build/XREAppData.h
rename : xpcom/glue/AppData.cpp => xpcom/glue/XREAppData.cpp
extra : source : eae2252a519f3ac5850f5110a6a1be45891ea5e9
2016-12-02 09:07:24 -05:00
Sebastian Hengst 27bd22acd7 Backed out changeset eae2252a519f (bug 1321593) for leaks, e.g. in clipboard and jetpack tests. r=backout
--HG--
rename : xpcom/build/XREAppData.h => xpcom/build/nsXREAppData.h
rename : xpcom/glue/XREAppData.cpp => xpcom/glue/AppData.cpp
2016-12-12 22:10:17 +01:00
Sebastian Hengst b65cbf32d8 Backed out changeset e531af57cd60 (bug 1321593) 2016-12-12 22:09:40 +01:00