Commit Graph

4275 Commits

Author SHA1 Message Date
Aaron Klotz
a2b73b8abc Bug 1570395: Add StaticLocalAutoPtr and StaticLocalRefPtr to XPCOM; r=froydnj
This patch adds smart pointers to be used for initializing objects as C++11
"magic statics" -- that is, they are able to take advantage of C++11's
guarantee of thread safety during initialization by atomically constructing
both the smart pointer itself as well as the object being pointed to.

Unlike Static{Auto,Ref}Ptr, they have non-trivial constructors, though they
must still have trivial destructors to prevent emission of atexit calls.

The new classes use the new `MOZ_STATIC_LOCAL_CLASS` annotation which ensures
their instantiations are static locals and prevents non-trivial destructors.

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

--HG--
rename : xpcom/base/StaticPtr.h => xpcom/base/StaticLocalPtr.h
extra : moz-landing-system : lando
2019-08-02 17:26:37 +00:00
mandy cheang
dcf8e881eb Bug 1553558 - collect countryCode in system info off the main thread. r=mconley,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D39343

--HG--
extra : moz-landing-system : lando
2019-08-02 12:55:38 +00:00
Dave Townsend
b2dea19e2d Bug 1570019: Verify that nsContentUtils is initialized before calling into it. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39895

--HG--
extra : moz-landing-system : lando
2019-07-30 15:51:17 +00:00
Dave Townsend
9d647b266c Bug 1569682: Fix GetSerialNumber to not destroy the just added serial number record. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39777

--HG--
extra : moz-landing-system : lando
2019-07-29 20:52:04 +00:00
Olli Pettay
c7ee50989c Bug 1565930, try to make Promise less error prone to compartment mismatches, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38762

--HG--
extra : moz-landing-system : lando
2019-07-29 14:43:54 +00:00
Yoshi Cheng-Hao Huang
e17d60cbf4 Bug 1551810 - Part 1: return bool in CallbackTracer methods. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D38980

--HG--
extra : moz-landing-system : lando
2019-07-26 08:59:38 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Kirk Steuber
0af11985df Bug 1551913 - Fix issues setting update directory permissions r=rstrong
This patch addresses both Bug 1551913 and Bug 1552206.

This patches the update directory permission-fixing code.

This also fixes a related bug that I discovered while testing this patch: nsAutoSid doesn't actually work because both PSID and HANDLE are both typedef'ed from void*, so the compiler can't actually tell the difference between them and ends up calling CloseHandle instead of FreeSid. To fix this, I removed nsAutoSid and replaced it with UniqueSidPtr, a UniquePtr type that uses a custom deleter class to free the SID properly.

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

--HG--
rename : toolkit/mozapps/update/common/win_dirent.cpp => toolkit/mozapps/update/common/updateutils_win.cpp
rename : toolkit/mozapps/update/common/win_dirent.h => toolkit/mozapps/update/common/updateutils_win.h
extra : moz-landing-system : lando
2019-07-24 16:05:46 +00:00
Kristen Wright
cf865d560a Bug 1513392 - move gathering total memory to before CanRecordReleaseData() bail r=erahm
Moves the trigger to gather total memory up about a hundred lines to the point before we bail on release so that it always triggers.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 15:23:12 +00:00
Karl Tomlinson
53e03975c9 Bug 1542931 add CycleCollectedJSContext::ReportError() r=baku
to make AutoJSAPI error reporting safe for worklets.

Parameter order matches xpc::ErrorReport::Init().

Depends on D34477

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

--HG--
extra : moz-landing-system : lando
2019-06-12 19:11:04 +00:00
Tom Ritter
74b0fa68cc Bug 1565951 - Request a longer timeout on a WebGL test for MinGW builds r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D38029

--HG--
extra : moz-landing-system : lando
2019-07-16 07:58:34 +00:00
Sylvestre Ledru
e77bfc655d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-16 07:33:44 +00:00
Niklas Hambüchen
b1eb1b43ef Bug 1564930 - Improve "XHR must not be LOADING or DONE" error messages. r=baku
The previous error message suggested that this is an internal error message
pointing out a bad state in the XHR state machine, when in fact this is
a user error (calling `overrideMimeType()` or setting `responseType()` after
`send()`).

This commit improves and disambiguates the error messages, pointing out to
the user what they did wrong, like other browsers do.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 22:51:10 +00:00
Nicholas Nethercote
40fa4b7402 Bug 1563996 - [Attempt 2] Make consoleservice.logcat a static pref. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D37203
2019-07-09 20:59:59 +10:00
Sylvestre Ledru
fc2eb5393c Bug 1562642 - Part 2 - Add missing MPL2 headers r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D37146

--HG--
extra : moz-landing-system : lando
2019-07-08 09:27:47 +00:00
Kershaw Chang
a53a39a584 Bug 1563824 - New error NS_ERROR_TOO_MANY_REQUESTS for 429 response r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D37140

--HG--
extra : moz-landing-system : lando
2019-07-06 21:46:00 +00:00
Sylvestre Ledru
131d0c6a02 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-06 08:18:28 +00:00
Kyle Huey
17b36a1a90 Bug 1563046: Move operator LogModule* out of line in debug builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D36675

--HG--
extra : moz-landing-system : lando
2019-07-02 23:58:18 +00:00
Gijs Kruitbosch
72cdd37986 Bug 1557762 - ensure we define NS_FREE_PERMANENT_DATA for single-stage pgo builds, r=chmanchester
Differential Revision: https://phabricator.services.mozilla.com/D35469

--HG--
extra : moz-landing-system : lando
2019-06-28 16:38:14 +00:00
Jon Coppeard
ace8608f82 Bug 1560931 - Fire memory-pressure-stop events on Windows r=gsvelto
I'd like to rely on always getting a stop event when the system recovers from a memory pressure situation.  AIUI this already happens on Android platforms but not on Windows.  This adds the stop event for Windows.

Differential Revision: https://phabricator.services.mozilla.com/D35679
2019-06-24 18:22:53 +01:00
Andrea Marchesini
872502eaf3 Bug 1560040 - Introduce 2 new URL-Classifier features to annotate and block social trackers, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D35421

--HG--
extra : moz-landing-system : lando
2019-06-22 16:53:50 +00:00
Gabriele Svelto
4ca4d77829 Bug 1558554 - Properly detect low-commit space scenarios on Windows r=dmajor
This uses GetPerformanceInformation() to measure how much commit space is
available globally. Previously we relied on GlobalMemoryStatusEx() but in
spite of the function name the commit-space values it returns are
*per process* and thus unreliable. Available physical memory measurement has
also been removed since it was never used and we don't plan on using it
anytime soon.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 20:56:41 +00:00
Haik Aftandilian
d302444d67 Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 22:55:27 +00:00
Haik Aftandilian
ae8cda84c2 Bug 1498742 - Part 1 - Move GetRepoDir() and GetObjDir() from ContentChild to nsMacUtilsImpl r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D34084

--HG--
extra : moz-landing-system : lando
2019-06-14 22:19:01 +00:00
Dorel Luca
fb616d00a6 Backed out 2 changesets (bug 1498742) for OSX build bustages. CLOSED TREE
Backed out changeset f6da94d90350 (bug 1498742)
Backed out changeset 4f3e83d8de59 (bug 1498742)
2019-06-15 00:13:05 +03:00
Haik Aftandilian
c0874f2dba Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 20:12:01 +00:00
Haik Aftandilian
d49c76ff46 Bug 1498742 - Part 1 - Move GetRepoDir() and GetObjDir() from ContentChild to nsMacUtilsImpl r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D34084

--HG--
extra : moz-landing-system : lando
2019-06-14 20:11:48 +00:00
Bogdan Tara
d62176d3d7 Backed out 2 changesets (bug 1498742) for nsMacUtilsImpl.cpp related build bustage a=backout
Backed out changeset 6729dc168afd (bug 1498742)
Backed out changeset e5eed57a9111 (bug 1498742)
2019-06-14 12:50:04 +03:00
Haik Aftandilian
f87e72036e Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 06:32:37 +00:00
Haik Aftandilian
fa1979ab86 Bug 1498742 - Part 1 - Move GetRepoDir() and GetObjDir() from ContentChild to nsMacUtilsImpl r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D34084

--HG--
extra : moz-landing-system : lando
2019-06-13 06:32:54 +00:00
Andreea Pavel
307e3f181b Backed out 2 changesets (bug 1498742) for build bustages at GMPProcessParent.cpp on a CLOSED TREE
Backed out changeset 5f9d32e26c71 (bug 1498742)
Backed out changeset ffc8d151cf3a (bug 1498742)
2019-06-13 04:38:56 +03:00
Haik Aftandilian
0f858863b6 Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 23:41:53 +00:00
Haik Aftandilian
a195f66f52 Bug 1498742 - Part 1 - Move GetRepoDir(), GetObjDir(), IsDevelopmentBuild() from ContentChild to nsMacUtilsImpl r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D34084

--HG--
extra : moz-landing-system : lando
2019-06-12 23:41:39 +00:00
Ciure Andrei
916d8a7f73 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-13 00:44:53 +03:00
Ciure Andrei
cb5d2852cb Merge inbound to mozilla-central. a=merge 2019-06-13 00:42:10 +03:00
Boris Zbarsky
53db65b94f Bug 1558653. Stop using [array] in nsIConsoleService. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D34666

--HG--
extra : moz-landing-system : lando
2019-06-12 18:10:19 +00:00
Mirko Brodesser
20b754bf1d Bug 1558758: narrow visibility from SnowWhiteKiller::MaybeKillObject to private.
Simplifies reasoning about the method.

Differential Revision: https://phabricator.services.mozilla.com/D34685
2019-06-12 14:57:07 +02:00
Mirko Brodesser
c1c3acd11d Bug 1558758: add a few comments to CC's documentation.
Differential Revision: https://phabricator.services.mozilla.com/D34684
2019-06-12 14:57:06 +02:00
Gijs Kruitbosch
a9c77b7f11 Bug 1553540 - switch disk information collection in system info off the main thread, r=aklotz,chutten,jya,arai
Differential Revision: https://phabricator.services.mozilla.com/D34417

--HG--
extra : moz-landing-system : lando
2019-06-12 15:56:59 +00:00
Valentin Gosu
340e0822c9 Bug 1459573 - Support Cross Origin Resource Policy (CORP) r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D33747

--HG--
extra : moz-landing-system : lando
2019-06-12 13:30:05 +00:00
Mirko Brodesser
c0011f4e0f Bug 1557296: replace "IsBlackAndDoesNotNeedTracing" with "HasKnownLiveWrapperAndDoesNotNeedTracing" in nsCycleCollectionParticipant's documentation
Because the latter method was renamed some time ago to the former.

Differential Revision: https://phabricator.services.mozilla.com/D33943
2019-06-11 17:17:27 +02:00
Daniel Varga
108b3fc423 Merge mozilla-inbound to mozilla-central. a=merge 2019-06-07 19:19:50 +03:00
Daniel Varga
a05236937c Merge mozilla-central to autoland
--HG--
extra : rebase_source : ef48ee99e861f57c5e04f0230238ab31940e46b1
2019-06-07 12:58:55 +03:00
Boris Zbarsky
89baee69d9 Bug 1557501. Stop using [array] in nsIPrefBranch. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D34032

--HG--
extra : moz-landing-system : lando
2019-06-07 01:01:12 +00:00
Dave Townsend
d9a9041a7c Bug 1556832: Comparing compatibility versions goes on to check the build IDs when the version is newer. r=froydnj
When comparing compatibility versions we first compare the version part. If that
shows us to be a downgrade then we stop checking at that point. But we must also
stop checking if it shows us to be an upgrade since we don't need to check the
build IDs at that point. This also applies to the check for the app build ID.

This means that a newer version with an older build id will appear to be a
downgrade.

This is problematic for safe mode because when safe mode runs it sets the
compatibility version to "Safe Mode" (bug 1556831) to ensure that caches are
invalidated on next startup. On the next run the Firefox version is considered
as newer than "Safe Mode" so we would move on to comparing the build IDs. But
the Firefox build ID gets version compared to "" (since there isn't a build ID
part in "Safe Mode"). Since build ID's are larger than 32-bit numbers we trigger
bug 1556829 and the actual comparison depends on the value of the build ID
truncated to 32-bits. This seems to often be negative and so lower than the
apparent previous build ID causing us to think this is a downgrade.

Cue nfroydnj saying I told you so because if I'd written this as a more
traditional compare function as he suggested I probably would have caught this.

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

--HG--
extra : rebase_source : bb506c4ba4d75a68976bb114015d53cd41b4d4c3
2019-06-04 10:44:16 -07:00
Dave Townsend
8f1c76b053 Bug 1556829: Convert version numbers larger or smaller than the 32-bit limit to 0. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D33700

--HG--
extra : rebase_source : 1fd6a7b05bb69a9dec655ffb3e668ae1bf13ee8f
2019-06-04 13:23:04 -07:00
Brian Hackett
60bf728495 Bug 1545400 - Increment recursion depth when debugger has saved a thread's microtasks, r=arai,smaug.
Differential Revision: https://phabricator.services.mozilla.com/D32889

--HG--
extra : rebase_source : 33e2c281ef94a565fe4fc1d1490e41d005f7835b
2019-05-28 10:28:03 -10:00
Mirko Brodesser
acdd70561f Bug 1556386: rename aSkip to aMightSkip in nsCycleCollectionParticipant.h. r=mccr8
Because it's more accurate.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 20:09:40 +00:00
Nicklas Boman
779fb0d72a Bug 1122740 - remove useless null checks after allocating memory with |new| r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D33445

--HG--
extra : moz-landing-system : lando
2019-06-04 04:43:11 +00:00
Honza Bambas
c35df87597 Bug 1545421 - New nsresult error codes for 407, 502 and 504 http response codes returned by proxies + test, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D32817

--HG--
extra : moz-landing-system : lando
2019-05-31 17:29:53 +00:00