Commit Graph

4314 Commits

Author SHA1 Message Date
Edgar Chen
5b6fe53148 Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45168

--HG--
extra : moz-landing-system : lando
2019-09-20 10:31:55 +00:00
arthur.iakab
069fc85399 Backed out changeset d6dc4ad211f2 (bug 1553546) for causing xpcshell failures on test_TelemetryEnvironment.js CLOSED TREE 2019-09-18 23:58:34 +03:00
Emma Malysz
6dfb67722e Bug 1553546, moving telemetry environment isWoW data and installYear data off-main-thread and implementing them on an idle task instead of on the main thread during startup r=mconley,chutten
Differential Revision: https://phabricator.services.mozilla.com/D43549

--HG--
extra : moz-landing-system : lando
2019-09-18 17:00:16 +00:00
Gerald Squelart
dc8ac83ba6 Bug 1578329 - Use profiler_can_accept_markers() where appropriate - r=gregtatum
In places where profiler_is_active() was used around a profiler_add_marker() (or
similar) call, replace it with profiler_can_accept_markers().

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

--HG--
extra : moz-landing-system : lando
2019-09-18 01:22:12 +00:00
Edgar Chen
5bd394332c Bug 1579858 - Should release RefPtr before CollectData is clear; r=smaug
mAboutToBeNotifiedRejectedPromises will be clear in AfterProcessMicrotasks()
and mPendingUnhandledRejections will be clear after NotifyUnhandledRejections
runnable is handled.

However, worker could terminate in any time, we still need to clear those
structures manually before CollectData is clear.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:12:07 +00:00
Bogdan Tara
361c83c1a9 Backed out 21 changesets (bug 1578327, bug 1575448, bug 1580091, bug 1576554, bug 1581049, bug 1576551, bug 1578329, bug 1576555) for platform.cpp related bustage CLOSED TREE
Backed out changeset 27afea20c396 (bug 1581049)
Backed out changeset be1ec4577d37 (bug 1581049)
Backed out changeset b4b6bbb18cc1 (bug 1581049)
Backed out changeset b30942f9db54 (bug 1581049)
Backed out changeset 473c431866f7 (bug 1578329)
Backed out changeset ac492dc3df20 (bug 1578329)
Backed out changeset f51875652f6f (bug 1578327)
Backed out changeset 512b7cbd18f6 (bug 1576555)
Backed out changeset 2d63a9934c00 (bug 1576555)
Backed out changeset ff73f648ab6c (bug 1576555)
Backed out changeset 49f49079bbb5 (bug 1576555)
Backed out changeset e8323157c6f3 (bug 1575448)
Backed out changeset 3b0d726f2dd6 (bug 1575448)
Backed out changeset 5924790abc4b (bug 1576554)
Backed out changeset a14ac9bb5338 (bug 1576554)
Backed out changeset b6d73f5042a7 (bug 1576551)
Backed out changeset 366030bd2d84 (bug 1576551)
Backed out changeset d7ee4148aad9 (bug 1576551)
Backed out changeset ec72dfc7301e (bug 1576551)
Backed out changeset 79b29286f906 (bug 1580091)
Backed out changeset 6f34c2e57ccf (bug 1580091)
2019-09-17 10:16:14 +03:00
Gerald Squelart
6b49069f3e Bug 1578329 - Use profiler_can_accept_markers() where appropriate - r=gregtatum
In places where profiler_is_active() was used around a profiler_add_marker() (or
similar) call, replace it with profiler_can_accept_markers().

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:53:56 +00:00
Gabriele Svelto
a84ef4be0c Bug 1575216 - Make low-memory detection use per-process stats to avoid janking the main thread r=dmajor
This reverts the available memory tracker back to its old implementation that
relied on GlobalMemoryStatusEx() instead of the potentially expensive
K32GetPerformanceInfo(). In spite of its name GlobalMemoryStatusEx() may return
per-process values instead of global ones which might lead to underestimating
the actual memory pressure. Because of this limitation this change is a
stop-gap while we replace this code with a non-polling implementation based on
QueryMemoryResourceNotification().

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

--HG--
extra : moz-landing-system : lando
2019-09-12 15:34:13 +00:00
Benjamin
934da4e096 Bug 1529068 - Implementation of the navigate-to CSP directive as defined in CSP Level 3. r=ckerschb,mccr8
https://www.w3.org/TR/CSP3/#directive-navigate-to

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

--HG--
extra : moz-landing-system : lando
2019-09-10 22:33:51 +00:00
Dorel Luca
ec62854d68 Backed out changeset 890bcaee9b7d (bug 1529068) for causing massive tier2 failures on central in dom/security/test/csp/test_navigate_to.html. CLOSED TREE 2019-09-05 09:47:35 +03:00
Benjamin
2202fa3333 Bug 1529068 - Implementation of the navigate-to CSP directive as defined in CSP Level 3. r=ckerschb,mccr8
https://www.w3.org/TR/CSP3/#directive-navigate-to

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

--HG--
extra : moz-landing-system : lando
2019-09-04 20:29:37 +00:00
Csoregi Natalia
2dd3b18187 Backed out changeset 99b313550fb8 (bug 1529068) for eslint failure on test_navigate_to.html. CLOSED TREE 2019-09-04 21:15:18 +03:00
Benjamin
33379674f8 Bug 1529068 - Implementation of the navigate-to CSP directive as defined in CSP Level 3. r=ckerschb,mccr8
https://www.w3.org/TR/CSP3/#directive-navigate-to

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

--HG--
extra : moz-landing-system : lando
2019-09-04 17:44:14 +00:00
Paul Zuehlcke
188941cdef Bug 1577767 - Call maybeForwardScriptError independently of parent process listeners state. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44152

--HG--
extra : moz-landing-system : lando
2019-09-04 09:44:50 +00:00
Gerald Squelart
95f77c2409 Bug 1576819 - Use PROFILER_ADD_MARKER{,_WITH_PAYLOAD} everywhere - r=gregtatum
All calls to `profiler_add_marker()` (outside of the profilers code) are
now replaced by either:
- `PROFILER_ADD_MARKER(name, categoryPair)`
- `PROFILER_ADD_MARKER_WITH_PAYLOAD(name, categoryPair, TypeOfMarkerPayload,
                                    (payload, ..., arguments))`

This makes all calls consistent, and they won't need to prefix the category pair
with `JS::ProfilingCategoryPair::`.

Also it will make it easier to add (and later remove) internal-profiling
instrumentation (bug 1576550), and to replace heap-allocated payloads with
stack-allocated ones (bug 1576555).

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

--HG--
extra : moz-landing-system : lando
2019-09-04 07:56:51 +00:00
Tom Ritter
d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Andreea Pavel
9f378c9fc1 Backed out changeset fee72f003ea2 (bug 1577767) win build bustages on a CLOSED TREE 2019-09-03 11:47:31 +03:00
Paul Zuehlcke
df9b4fb190 Bug 1577767 - Call maybeForwardScriptError independently of parent process listeners state. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44152

--HG--
extra : moz-landing-system : lando
2019-09-02 11:23:59 +00:00
Paul Zuehlcke
735128f5c7 Bug 1559167 - Updated logMessage to support logging of scriptErrors from parent to content process. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D42295

--HG--
extra : moz-landing-system : lando
2019-08-27 17:37:55 +00:00
Kris Maglione
252aae5429 Bug 1577263: Use memcmp for nsID::Equals. r=froydnj
Compilers have gotten a lot better since the last time we tried this, and the
generated SIMD code for the inlined memcmp is more efficient than our manual
comparison operations.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 19:08:44 +00:00
Honza Bambas
bf7dde4bf0 Bug 1574882 - Always add .moz_log to target logging filenames, r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D42487

--HG--
extra : moz-landing-system : lando
2019-08-23 16:51:40 +00:00
Cameron McCormack
a1e18da1b1 Bug 1573090 - Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald
Whereas previously MozDescribeCodeAddress would have handled demangling,
we need to explicitly do that from our new GetFunction method.  The string we
generate is now more useful for the profiler to merge -- having dropped the
address in the previous patch, and the file & line number and library in this
patch.

While we're at it, try to demangle Rust symbols too.

Ideally we'd add Rust symbol handling to DemangleSymbol in
StackWalk.cpp, but that lives in mozglue, which currently cannot have
any Rust crate dependencies.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 05:45:16 +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
Gijs Kruitbosch
51739da3cb Bug 1163103 - stop using NS_GetSpecialDirectory off the main thread within the cycle collector (via nsDumpUtils.cpp), r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D42856

--HG--
extra : moz-landing-system : lando
2019-08-21 17:23:03 +00:00
Gijs Kruitbosch
87c086d34e Bug 1575045 - stop using the directory service off the main thread from nsSystemInfo, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42820

--HG--
extra : moz-landing-system : lando
2019-08-21 11:16:02 +00:00
Robert Strong
8be2059dbd Bug 1486637 - Backout bug 1486637 and related patches. r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D42143

--HG--
extra : moz-landing-system : lando
2019-08-19 19:43:17 +00:00
Brian Hackett
091f2992d2 Bug 1573938 - Never collect wrapper JSObjects when recording/replaying, r=mccr8.
Differential Revision: https://phabricator.services.mozilla.com/D42011

--HG--
extra : moz-landing-system : lando
2019-08-16 20:51:12 +00:00
Aaron Klotz
112f1594bf Bug 1573623: Add RunOnShutdown, a variant of ClearOnShutdown which supports passing callables; r=froydnj
This patch adds `RunOnShutdown`, which allows the caller to supply any callable
to be invoked during the specified shutdown phase. This allows us to do more
than just clear smart pointers without needing to write a bunch of observer
service boilerplate.

We use `std::function` to hold the callable.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 19:08:39 +00:00
Jonathan Kew
49e3e4c0e0 Bug 1573229 - part 1 - Add infallible versions of the memory-allocation functions in CountingAllocatorBase. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D41720

--HG--
extra : moz-landing-system : lando
2019-08-15 00:49:55 +00:00
Jon Coppeard
c772fc6cda Bug 1573844 - Remove external references to js::Class r=mccr8
Depends on D41985

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

--HG--
extra : moz-landing-system : lando
2019-08-14 17:15:15 +00:00
Jon Coppeard
6d38179350 Bug 1573844 - Remove external references to js::Jsvalify and js::Valueify r=mccr8
These are now no-ops so can be removed.

Depends on D41983

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

--HG--
extra : moz-landing-system : lando
2019-08-14 17:24:59 +00:00
Jon Coppeard
66fc30ba53 Bug 1573844 - Remove js::Class definition and alias JSClass to it r=tcampbell,mccr8
JSClass contained void* members corresponding to the internal pointer members of js::Class. This stores the internal members in JSClass and removes js::Class.

This leaves js::Class aliased to JSClass while we remove references to it. I also aliased Jsvalify and Valueify into global scope temporarily to make this compile. These get removed in the following patches.

I had to remove a few functions which now don't compile with js::Class being the same type as JSClass.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 08:32:22 +00:00
Nathan Froyd
87c432d06a Bug 1570982 - remove CPP_THROW_NEW; r=glandium
We always define it to the same thing, and we're inconsistent in whether
we use `CPP_THROW_NEW` or `throw()`, so we might as well just use the
standard C++ thing and get rid of some baggage.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 01:32:41 +00:00
Jon Coppeard
8b73371be0 Bug 1407593 - Report embedding leaks of JS GC things r=sfink,sfink?
Patch to report JS GC things that are live at shutdown as leaks by calling MOZ_LOG_CTOR for them. The JS engine now clears any remaining roots to prevent dangling pointers to freed memory after shutdown. I made XPCJSRuntime::Shutdown keep the weak pointer update callbacks as sometimes these tables have entries remaining at shutdown (if there are leaks) and we need the callbacks to update them.

This is looking more green on try now.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 08:31:49 +00:00
Brendan Dahl
b474db77c6 Bug 1551344 - Part 1: Remove XULDocument code. r=smaug,Jamie
All .xul files have been loading as HTMLDocuments for a few weeks now, so
it should be safe to remove the XULDocument implementation.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 19:57:50 +00:00
Aaron Klotz
1fc3efff69 Bug 1568361: Use StaticLocalAutoPtr for BackgroundMTAData; r=Jamie
The new StaticLocalAutoPtr smart pointer has a trivial destructor, so we will
either properly clean up this data or leak it on process shutdown. Either way,
we will not destroy it in a way that the underlying type does not support.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 01:48:31 +00:00
Andreea Pavel
8f56db01f7 Backed out changeset d0aae34d9b95 (bug 1529068) for failing form-redirected-blocked.sub.html on a CLOSED TREE
--HG--
extra : rebase_source : 4d7a73e1f40de001031c61fba240c57961a902d8
2019-08-07 01:39:29 +03:00
Cameron McCormack
d075470483 Bug 1053379 - Simplify CodeAddressService so non-DMD users can rely on defaults. r=njn
None of the StringTable implementations were freeing their strdup'd
strings, either.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 21:58:12 +00:00
Benjamin
455d7a7789 Bug 1529068 - navigate-to r=ckerschb,mccr8
Implementation of the navigate-to CSP directive as defined in CSP Level 3, https://www.w3.org/TR/CSP3/#directive-navigate-to

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

--HG--
extra : moz-landing-system : lando
2019-08-06 18:27:45 +00:00
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