gecko-dev/dom/ipc
Doug Thayer bad3183238 Bug 1594577 - Record hangs which precede forced shutdowns r=froydnj
In short - if a user forcibly terminates the browser because it seems
to be permanently hung, we currently do not get a change to record the
hang. This is unfortunate, because these likely represent the most
egregious hangs in terms of user frustration. This patch seeks to
address that.

If a hang exceeds 8192ms (the current definition of a "permahang" in
existing BHR terms), then we decide to immediately persist it to disk,
in case we never get a chance to return to the main thread and
submit it. On the next start of the browser, we read the file from
disk on a background thread, and just submit it using the normal
mechanism.

Regarding the handling of the file itself, I tried to do the simplest
thing I could - as far as I can tell there is no standard simple
serialization mechanism available directly to C++ in Gecko, so I just
serialized it by hand. I didn't take any special care with endianness
or anything as I can't think of a situation in which we really care
at all about these files being transferable between architectures. I
directly used PR_Write / PR_Read instead of doing something fancy
like memory mapping the file, because I don't think performance is a
critical concern here and it offers a simple protection against
reading out of bounds.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 22:41:00 +00:00
..
fuzztest
tests Bug 1592093 - Make cancellation of content JS, when navigating through history to prevent hangs, Fission compatible, r=smaug,squib 2019-11-18 21:25:14 +00:00
BrowserBridgeChild.cpp Bug 1589054 - Part 1: Cleanly kill BrowserBridgeChild if process switch fails, r=farre 2019-10-22 13:57:00 +00:00
BrowserBridgeChild.h Bug 1589054 - Part 1: Cleanly kill BrowserBridgeChild if process switch fails, r=farre 2019-10-22 13:57:00 +00:00
BrowserBridgeHost.cpp Bug 1561627 - Don't crash in BrowserBridgeHost if we don't have a widget. r=mattwoodrow 2019-07-09 22:21:29 +00:00
BrowserBridgeHost.h Bug 1561627 - Don't crash in BrowserBridgeHost if we don't have a widget. r=mattwoodrow 2019-07-09 22:21:29 +00:00
BrowserBridgeParent.cpp Bug 1581040: handle late creation/re-creation of OuterDocAccessible for OOP iframe. r=yzen,nika 2019-11-07 00:38:59 +00:00
BrowserBridgeParent.h Bug 1576714 - Part 3: Initiate subframe process switches from the parent, r=kmag 2019-10-15 16:19:16 +00:00
BrowserChild.cpp Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp 2019-11-21 21:15:46 +00:00
BrowserChild.h Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp 2019-11-21 21:15:46 +00:00
BrowserHost.cpp Bug 1592829 - Remove hasContentOpener logic from C++ and check for content opener directly from JavaScript, r=nika 2019-11-06 20:14:32 +00:00
BrowserHost.h Bug 1556555 - Generate TabId for PBrowserBridge in content process and retain reference to it. r=nika 2019-06-02 13:42:03 -04:00
BrowserParent.cpp Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp 2019-11-21 21:15:46 +00:00
BrowserParent.h Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp 2019-11-21 21:15:46 +00:00
CPOWManagerGetter.h
CSPMessageUtils.cpp Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
CSPMessageUtils.h Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
CoalescedInputData.h
CoalescedMouseData.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
CoalescedMouseData.h Bug 1534395 - Rename TabChild to BrowserChild. r=nika 2019-04-09 17:39:01 -05:00
CoalescedWheelData.cpp
CoalescedWheelData.h
ColorPickerParent.cpp Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug 2019-09-30 22:06:47 +00:00
ColorPickerParent.h
ContentChild.cpp Bug 1597014 - Unify same-process and cross-process redirect to real channel functions to avoid needed separate promise handlers. r=mayhemer 2019-11-20 01:48:32 +00:00
ContentChild.h Bug 1597014 - Unify same-process and cross-process redirect to real channel functions to avoid needed separate promise handlers. r=mayhemer 2019-11-20 01:48:32 +00:00
ContentParent.cpp Bug 1594577 - Record hangs which precede forced shutdowns r=froydnj 2019-11-21 22:41:00 +00:00
ContentParent.h Bug 1575092 - add "web COOP+COEP" process type helpers r=asuth 2019-11-20 19:45:14 +00:00
ContentProcess.cpp Bug 1375863 - fold MOZ_CONTENT_SANDBOX and MOZ_GMP_SANDBOX into MOZ_SANDBOX; r=jld,firefox-build-system-reviewers 2019-03-18 22:31:59 +00:00
ContentProcess.h Bug 1400344: Rename mscom::MainThreadRuntime to mscom::ProcessRuntime and make it aware of Win32k lockdown and of multiple instantiations; r=Jamie 2019-02-14 18:56:20 +00:00
ContentProcessManager.cpp Bug 1566643 - Part 5: Remove CPM::GetBrowserParentsByProcessId, r=kmag 2019-08-08 16:07:34 +00:00
ContentProcessManager.h Bug 1566643 - Part 5: Remove CPM::GetBrowserParentsByProcessId, r=kmag 2019-08-08 16:07:34 +00:00
DOMTypes.ipdlh Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre 2019-10-23 19:39:00 +00:00
DocShellMessageUtils.cpp Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
DocShellMessageUtils.h Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
EffectsInfo.h Bug 1558482 - Add visibleRect and scaling to EffectsInfo and compute them when using layers. r=mattwoodrow 2019-06-11 07:50:40 -05:00
FilePickerParent.cpp Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug 2019-09-30 22:06:47 +00:00
FilePickerParent.h Bug 1553603 - Support "capture" attribute in Gecko and expose in GV. r=geckoview-reviewers,smaug,snorp,agi 2019-07-30 18:13:05 +00:00
IdType.h Bug 1553490 - Make RestoreBrowsingContextChildren take an array of BCs. r=nika 2019-05-28 07:40:00 +00:00
JSWindowActor.cpp Bug 1570115 - Add do_QueryActor to query JS-implemented interfaces. r=kmag 2019-09-20 18:01:07 +00:00
JSWindowActor.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
JSWindowActorChild.cpp Bug 1561705: Part 1 - Add JSWindowActor.actorCreated callback. r=jdai 2019-08-14 16:13:13 -07:00
JSWindowActorChild.h Bug 1578173 part 2. Convert chrome-webidl bits to constructor operations. r=edgar 2019-09-11 20:55:26 +00:00
JSWindowActorParent.cpp Bug 1523638 - Part 1: Remove mIPCClosed from PWindowGlobal, r=kmag 2019-08-08 16:06:52 +00:00
JSWindowActorParent.h Bug 1578173 part 2. Convert chrome-webidl bits to constructor operations. r=edgar 2019-09-11 20:55:26 +00:00
JSWindowActorService.cpp Bug 1593487 - tighten up registerWindowActor's handling of nonsensical actor specifications and remove cruft, r=nika,mconley 2019-11-08 11:59:37 +00:00
JSWindowActorService.h Bug 1581925 - Part 1: Capture parent process JSWindowActor events at InProcessBrowserChildMessageManager, r=kmag 2019-10-07 19:35:06 +00:00
MMPrinter.cpp Bug 1534395 - Unified build fixes. r=nika 2019-04-09 17:38:11 -05:00
MMPrinter.h Bug 1534395 - Unified build fixes. r=nika 2019-04-09 17:38:11 -05:00
ManifestMessagesChild.jsm Bug 1566018 - Return the URL of the manifest from manifest validation in object r=Ola,baku 2019-07-17 14:04:19 +00:00
MemMapSnapshot.cpp Bug 1479960 - Convert MemMapSnapshot to use frozen shared memory. r=kmag 2019-08-14 22:48:40 +00:00
MemMapSnapshot.h Bug 1479960 - Convert MemMapSnapshot to use frozen shared memory. r=kmag 2019-08-14 22:48:40 +00:00
MemoryReportRequest.cpp Bug 1532725 - Rename PRemoteFrame to PBrowserBridge. r=nika 2019-03-04 20:15:58 -06:00
MemoryReportRequest.h Bug 1531476 - replace MaybeFileDesc with FileDescriptor? in IPDL; r=mccr8 2019-02-28 21:20:40 +00:00
MemoryReportTypes.ipdlh Bug 1531476 - replace MaybeFileDesc with FileDescriptor? in IPDL; r=mccr8 2019-02-28 21:20:40 +00:00
PBrowser.ipdl Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp 2019-11-21 21:15:46 +00:00
PBrowserBridge.ipdl Bug 1582042 - Remove useless threading of aForceRepaint around various IPC messages. r=mconley 2019-09-26 22:11:17 +00:00
PBrowserOrId.ipdlh
PColorPicker.ipdl
PContent.ipdl Bug 1597014 - Unify same-process and cross-process redirect to real channel functions to avoid needed separate promise handlers. r=mayhemer 2019-11-20 01:48:32 +00:00
PContentPermission.ipdlh
PContentPermissionRequest.ipdl
PCycleCollectWithLogs.ipdl
PFilePicker.ipdl Bug 1553603 - Support "capture" attribute in Gecko and expose in GV. r=geckoview-reviewers,smaug,snorp,agi 2019-07-30 18:13:05 +00:00
PLoginReputation.ipdl
PPluginWidget.ipdl
PProcessHangMonitor.ipdl Bug 1582042 - Remove useless threading of aForceRepaint around various IPC messages. r=mconley 2019-09-26 22:11:17 +00:00
PTabContext.ipdlh Bug 1539497, navigator.maxTouchPoints returns 0 in child process, r=ehsan 2019-07-19 01:45:16 +03:00
PURLClassifier.ipdl Bug 1536372 - Get rid of PURLClassifierInfo MaybeInfo, r=dimi 2019-03-19 09:31:07 +00:00
PURLClassifierInfo.ipdlh Bug 1536372 - Get rid of PURLClassifierInfo MaybeInfo, r=dimi 2019-03-19 09:31:07 +00:00
PURLClassifierLocal.ipdl
PWindowGlobal.ipdl Bug 1590782 - Switch process when InternalLoad finds oop BrowsingContext. r=mattwoodrow 2019-11-12 21:52:18 +00:00
PermissionMessageUtils.cpp Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
PermissionMessageUtils.h Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
PreallocatedProcessManager.cpp Bug 1538200 - Kill the preallocated process when we're low on memory r=mconley 2019-10-31 15:55:40 +00:00
PreallocatedProcessManager.h
PrefsTypes.ipdlh Bug 1536163 - Part 2 - use native Maybe syntax in place of MaybePrefValue in IPDL; r=mccr8 2019-03-21 06:51:43 +02:00
ProcessHangMonitor.cpp Bug 1595831 - use StaticPrefs for dom.ipc prefs for ContentParent and the hang monitor code, r=kmag 2019-11-12 21:30:11 +00:00
ProcessHangMonitor.h Bug 1582042 - Remove useless threading of aForceRepaint around various IPC messages. r=mconley 2019-09-26 22:11:17 +00:00
ProcessHangMonitorIPC.h
ProcessPriorityManager.cpp Bug 1571544 - Convert two dom.ipc.processPriorityManager.* prefs to static prefs. r=njn 2019-08-05 23:26:45 +00:00
ProcessPriorityManager.h Bug 1534395 - Rename TabParent to BrowserParent. r=nika 2019-04-09 16:38:15 -05:00
ReferrerInfoUtils.cpp Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
ReferrerInfoUtils.h Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj 2019-05-21 17:04:39 +00:00
RemoteBrowser.cpp Bug 1562642 - Add missing MPL2 headers r=mhoye 2019-07-05 17:05:57 +00:00
RemoteBrowser.h Bug 1556555 - Generate TabId for PBrowserBridge in content process and retain reference to it. r=nika 2019-06-02 13:42:03 -04:00
RemoteWebProgress.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
RemoteWebProgress.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
RemoteWebProgressRequest.cpp Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE 2019-11-11 12:11:36 +02:00
RemoteWebProgressRequest.h Bug 1559657: Pass load time in RemoteWebProgress. r=Ehsan,barret 2019-07-11 04:00:41 +00:00
ServiceWorkerConfiguration.ipdlh
SharedMap.cpp Bug 1550108 - Split out Input/OutputBuffer into their own file r=froydnj 2019-10-04 20:44:41 +00:00
SharedMap.h
SharedMapChangeEvent.h
SharedStringMap.cpp Bug 1479960 - Give SharedStringMap a magic number so that all zeroes isn't a valid instance. r=kmag 2019-08-14 22:48:38 +00:00
SharedStringMap.h Bug 1479960 - Give SharedStringMap a magic number so that all zeroes isn't a valid instance. r=kmag 2019-08-14 22:48:38 +00:00
StringTable.h
StructuredCloneData.cpp Bug 1562663 - P4a - Deny sharing memery by default for DataClonePolicy; r=nika,lth 2019-09-26 13:27:25 +00:00
StructuredCloneData.h Bug 1539261, part 2 - Mark various JSStructuredCloneData methods MOZ_MUST_USE. r=sfink 2019-03-27 20:41:17 +00:00
TabContext.cpp Bug 1590032 - Propagate the first party domain when creating new browser in Fission. r=smaug 2019-10-24 08:51:06 +00:00
TabContext.h Bug 1590032 - Propagate the first party domain when creating new browser in Fission. r=smaug 2019-10-24 08:51:06 +00:00
TabMessageUtils.cpp
TabMessageUtils.h Bug 1564195 - Group the results of APZInputBridge::ReceiveInputEvent() into a struct. r=tnikkel 2019-09-19 02:45:21 +00:00
URLClassifierChild.h Bug 1536372 - Get rid of PURLClassifierInfo MaybeInfo, r=dimi 2019-03-19 09:31:07 +00:00
URLClassifierParent.cpp Bug 1580416 - P1. Use a different fragment method when the URI is a pairwiseWhitelistedURI. r=Ehsan 2019-09-27 13:22:18 +00:00
URLClassifierParent.h Bug 1231213 - Properly declare some dependencies so everything will compile with additional files. r=asuth 2019-08-15 17:25:44 +00:00
UserActivationIPCUtils.h Bug 1578355 - Part 2: Introduce UserActivation::State; r=smaug 2019-09-20 11:10:13 +00:00
WindowGlobalActor.cpp Bug 1523638 - Part 5: Create a WindowGlobal actor during normal PBrowser construction, r=kmag 2019-08-08 16:07:05 +00:00
WindowGlobalActor.h Bug 1523638 - Part 5: Create a WindowGlobal actor during normal PBrowser construction, r=kmag 2019-08-08 16:07:05 +00:00
WindowGlobalChild.cpp Bug 1590782 - Switch process when InternalLoad finds oop BrowsingContext. r=mattwoodrow 2019-11-12 21:52:18 +00:00
WindowGlobalChild.h Bug 1590782 - Switch process when InternalLoad finds oop BrowsingContext. r=mattwoodrow 2019-11-12 21:52:18 +00:00
WindowGlobalParent.cpp Bug 1590782 - Switch process when InternalLoad finds oop BrowsingContext. r=mattwoodrow 2019-11-12 21:52:18 +00:00
WindowGlobalParent.h Bug 1590782 - Switch process when InternalLoad finds oop BrowsingContext. r=mattwoodrow 2019-11-12 21:52:18 +00:00
components.conf Bug 1510569 - Reimplement RemoteWebProgressRequest as an XPCOM component in C++ r=Ehsan 2019-04-03 17:31:07 +00:00
jar.mn
moz.build Bug 1584839 - Move OpenBSD pledge promises to files r=gcp 2019-11-07 09:52:18 +00:00
nsIHangReport.idl
nsIRemoteWebProgress.idl Bug 1510569 - Reimplement RemoteWebProgress as an XPCOM component in C++ r=Ehsan 2019-04-03 17:30:40 +00:00
nsIRemoteWebProgressRequest.idl Bug 1559657: Pass load time in RemoteWebProgress. r=Ehsan,barret 2019-07-11 04:00:41 +00:00
nsQueryActor.h Bug 1583378 - Remove unneded warning in do_QueryActor. r=kmag 2019-09-23 22:32:37 +00:00
remote-test.js Bug 1561435 - Format dom/, a=automatic-formatting 2019-07-05 10:44:55 +02:00
test.xul Bug 1584303 - Replace <xul:textbox> with <html:input> in dom/ipc/test.xul;r=smaug 2019-09-30 19:31:56 +00:00