Commit Graph

2058 Commits

Author SHA1 Message Date
Ehsan Akhgari
9f9b9fb7f4 Bug 1196430 follow-up: Hide the usage of gCodeAddressService behind #ifdef MOZ_STACKWALKING
This is needed to fix the build bustage on B2G Desktop Windows.
Landed on a CLOSED TREE
2015-09-11 00:06:40 -04:00
Nathan Froyd
237343059e Bug 1196430 - part 8 - use less reinterpret_cast in nsTraceRefcnt.cpp; r=mccr8 2015-08-26 22:57:32 -04:00
Nathan Froyd
ff63162b54 Bug 1196430 - part 5 - dump allocation stacks for leaked objects in XPCOM_MEM_LOG_CLASSES; r=mccr8 2015-08-26 19:10:22 -04:00
Nathan Froyd
b8e075e20f Bug 1196430 - part 4 - record allocation stacks for classes in XPCOM_MEM_LOG_CLASSES; r=mccr8 2015-08-26 18:47:03 -04:00
Nathan Froyd
2fab94ca6e Bug 1196430 - part 3 - remove unnecessary nsString.h include from nsTraceRefcnt.cpp; r=mccr8 2015-08-26 18:28:35 -04:00
Nathan Froyd
e6e706a019 Bug 1196430 - part 2 - give SerialNumberRecord a proper constructor; r=mccr8
Using C++ style is so much nicer for these sorts of things.  This change
also paves the way for easily using non-POD things in SerialNumberRecord.
2015-08-26 18:25:35 -04:00
Nathan Froyd
c2982d671f Bug 1196430 - part 1 - rename serialNumberRecord to SerialNumberRecord; r=mccr8
This is a small cleanup to make the class name conform to coding standards.
2015-08-26 18:24:13 -04:00
Nikhil Marathe
33d00f662c Bug 1198230 - Respect FetchEvent.preventDefault(). r=jdm
Update web-platform-tests expected data
2015-09-04 12:00:24 -07:00
Nicholas Nethercote
4813d140f8 Bug 1202526 (part 8) - Use PLDHashTable::RemoveEntry() in the cycle collector. r=mccr8.
This avoids repeating the hash table search in order to remove a CC graph
entry, which is good because it's a common operation.
2015-09-07 21:15:32 -07:00
Milan Sreckovic
36ff2737c1 Bug 1128472 - Part 3. Vendor string on windows. r=aklotz 2015-09-03 13:10:00 +02:00
Milan Sreckovic
40fd6b692f Bug 1128472 - Part 2. Linux support. r=gfritzsche 2015-09-08 14:35:00 +02:00
Milan Sreckovic
ad13f63e54 Bug 1128472 - Part 1. Mac and Win for model, stepping, cores, cache, cpu speed; VM max on Win only, vendor on Mac only. r=gfritzsche 2015-09-01 14:48:00 +02:00
Terrence Cole
e6825e10a2 Bug 1199843 - Part 3: Strongly type JS::TraceChildren; r=jonco r=mccr8 2015-09-02 11:34:36 -07:00
Andrew McCreight
95326f12c2 Bug 1200795, part 2 - Add memory reporting for CCGraph::mPtrToNodeMap. r=njn 2015-09-04 09:45:44 -07:00
Andrew McCreight
61c108185c Bug 1200795, part 1 - Eliminate excessive detail from cycle collector graph memory reporting. r=njn 2015-09-04 09:45:44 -07:00
Alphan Chen
bfc4f93947 Bug 1154435 - [nsGZFileWriter] Add one more mode for writing a GZFile (Create/Append). r=froydnj 2015-06-05 11:20:16 +08:00
Alphan Chen
64f03fb24f Bug 1154435 - [nsDumpUtil] Refine nsDumpUtils::OpenTempFile to make this function more flexible. r=dhylands
- Add one more mode in this function (CREATE/CREATE_UNIQUE)
- export the header file for the usage of other components
2015-06-04 14:47:09 +08:00
Ben Kelly
0fbb3b30fe Bug 1184607 P4 Handle the RequestRedirect mode during service worker interception. r=nsm
* * *
Bug 1184607 P4 interdiff 001 fix manual redirect assertion for navigations r=nsm
* * *
Bug 1184607 P4 interdiff 002 dom/worker nits
2015-08-31 14:26:29 -07:00
Nicholas Nethercote
10d95cca57 Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Kyle Huey
0bfcedbfe8 Bug 1195755: Don't assert recursion depth sanity on Mac, because there is none. r=me 2015-08-21 19:56:56 -07:00
Nicholas Nethercote
e37e6d5b06 Bug 1194061 - Implement "system-heap-allocated" reporter for Windows. r=dmajor. 2015-08-19 20:35:17 -07:00
Xidorn Quan
6f7cb57689 Bug 1196050 - Replace NSCAP_Zero usage with decltype(nullptr). r=froydnj 2015-08-20 10:30:10 +10:00
Chris Manchester
1aef50f858 Bug 1131325 - Move system country code from nsIGfxInfo2 to a more appropriate location. r=aklotz,smichaud 2015-07-28 15:45:34 -07:00
Nathan Froyd
30aea00873 Bug 1189829 - fix quadratic behavior in nsConsoleService; r=erahm 2015-08-17 21:05:48 -04:00
Andrew McCreight
c60ad3f91a Bug 1190483 - Followup to address review comment. 2015-08-14 10:04:41 -07:00
Andrew McCreight
36dad8e996 Bug 1190483 - Add a way to record a DMD log late in shutdown. r=erahm 2015-08-14 10:00:04 -07:00
Mike Conley
6ca832b8e4 Bug 1106321 - Serialize DEVMODE down to the content process when printing on Windows. r=jimm 2015-08-06 17:36:54 -04:00
Nicholas Nethercote
19405fbd7a Bug 828844 - Add a "system-heap-allocated" memory report on Linux. r=glandium.
This gives zero when jemalloc is enabled and non-zero when jemalloc is disabled
(e.g. I got 83 MiB at start-up, which sounds plausible).
2015-08-12 17:44:00 -07:00
Francois Marier
6349d3c212 Bug 992096 - Implement Sub Resource Integrity [1/2]. r=baku,r=ckerschb
Code changes
2015-08-12 20:19:11 -07:00
Terrence Cole
ae96ebf942 Bug 1193032 - Part 2: Make unlimited SliceBudget initialization explicit; r=ehoogeveen,r=mccr8 2015-08-11 08:42:24 -07:00
Kyle Huey
1ffb03e8dc Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Aryeh Gregor
a3c0771347 Bug 1190823 - Move OwningNonNull.h to xpcom/base/; r=froydnj 2015-08-05 15:28:27 +03:00
Birunthan Mohanathas
9b6236a10a Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
James Cheng
894409e112 Bug 1189231 - Impl operator->* to nsAutoPtr. r=nfroyd 2015-07-30 21:02:00 -04:00
Nicholas Nethercote
845b474b3c Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)
2015-07-30 21:19:57 -07:00
Jesse Ruderman
e08f0ec656 Bug 1024259: Use NS_FREE_PERMANENT_DATA more consistently. r=mccr8 2015-07-31 12:11:48 -07:00
Kyle Huey
19e891a252 Bug 1152574: Fix console service discarding to run when it is actually safe to do so (off of inner-window-destroyed). Also add a backstop at xpcom-shutdown to discard any cycle collected messages before it is too late. r=froydnj 2015-07-31 06:49:27 -07:00
Andrew McCreight
4df5cf03f0 Bug 1189122 - Assert when we Suspect() when a CC scan is in progress. r=smaug
This can cause leaks that are invisible to our XPCOM leak detection system.

To avoid this, classes should not addref or release in their Traverse methods.
2015-07-29 20:48:00 +02:00
Nicholas Nethercote
b003fba482 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.
2015-07-28 23:24:24 -07:00
Bobby Holley
106e778c81 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Bobby Holley
a567cf64a6 Bug 1188696 - Remove the XPCOM dependencies in nsRefPtr.h. r=froydnj 2015-07-29 10:44:58 -07:00
Ryan VanderMeulen
7e14fbd090 Bug 1180017 - Fix up the badly-horked backout and re-land.
CLOSED TREE
2015-07-29 12:31:47 -04:00
Jim Blandy
2b89c02c18 Bug 1180017 - Give GCCellPtr is<T> and to<T> methods, replacing isFoo and toFoo methods. Fix callers. r=terrence 2015-07-03 15:06:23 -07:00
Carsten "Tomcat" Book
a908483c16 Backed out changeset 465793bc6fcf (bug 1180017) for suspicion of causing bug 1188799 2015-07-29 15:27:12 +02:00
Jim Blandy
04e076a9d6 Bug 1180017: Give GCCellPtr is<T> and as<T> methods, replacing isFoo and toFoo methods. Fix callers. r=terrence 2015-07-07 09:52:01 -07:00
Ehsan Akhgari
843a39d44d Bug 1188203 - Fix more constructors in XPCOM; r=froydnj 2015-07-28 12:24:37 -04:00
Nate Hughes
b12d6d89f1 Bug 986302 - Add memory reporting for HPACK tables r=hurley r=njn 2015-07-17 14:38:10 -07:00
Andrew McCreight
912f11f92b Bug 1179924 - Create a more modern JS object holder for cross-thread references to JS objects. r=smaug 2015-07-21 11:31:44 -07:00
Andrew McCreight
ec84671bad Bug 1185144 - nsConsoleService::LogMessageWithMode() should release the retired message on the main thread. r=froydnj
Also, add release asserts that the other methods that addref or release console messages are only run on the main thread.

Finally, add an assert that nsScriptErrorWithStack is only created on the main thread.
2015-07-21 07:50:09 -07:00
Carsten "Tomcat" Book
c70f141ba4 Backed out changeset 8b90b21e0c64 (bug 986302) for static build failures 2015-07-21 08:53:37 +02:00