Bug 1647695 - Expose ChildID on frozen nsIHangReport;r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D83665
This commit is contained in:
David Teller 2020-08-03 17:34:53 +00:00
Родитель 7b6a5cb14a
Коммит d94647eccd
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -1214,6 +1214,15 @@ HangMonitoredProcess::UserCanceled() {
return NS_OK;
}
NS_IMETHODIMP
HangMonitoredProcess::GetChildID(uint64_t* aChildID) {
if (!mContentParent) {
return NS_ERROR_NOT_AVAILABLE;
}
*aChildID = mContentParent->ChildID();
return NS_OK;
}
static bool InterruptCallback(JSContext* cx) {
if (HangMonitorChild* child = HangMonitorChild::Get()) {
return child->InterruptCallback();

Просмотреть файл

@ -40,6 +40,9 @@ interface nsIHangReport : nsISupports
// Only valid for PLUGIN_HANG reports.
readonly attribute ACString pluginName;
// The child id of the process in which the hang happened.
readonly attribute unsigned long long childID;
// Called by front end code when user ignores or cancels
// the notification.
void userCanceled();