2017-07-11 00:46:28 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2017-07-20 21:31:56 +03:00
|
|
|
%{ C++
|
|
|
|
namespace mozilla {
|
|
|
|
class HangDetails;
|
|
|
|
}
|
|
|
|
%}
|
|
|
|
|
|
|
|
[ref] native HangDetailsRef(mozilla::HangDetails);
|
|
|
|
|
2017-07-11 00:46:28 +03:00
|
|
|
/**
|
|
|
|
* A scriptable interface for getting information about a BHR detected hang.
|
|
|
|
* This is the type of the subject of the "bhr-thread-hang" observer topic.
|
|
|
|
*/
|
|
|
|
[scriptable, uuid(23d63fff-38d6-4003-9c57-2c90aca1180a)]
|
|
|
|
interface nsIHangDetails : nsISupports
|
|
|
|
{
|
2019-11-22 01:41:00 +03:00
|
|
|
/**
|
|
|
|
* The hang was persisted to disk as a permahang, so we can clear the
|
|
|
|
* permahang file once we submit this.
|
|
|
|
*/
|
|
|
|
readonly attribute bool wasPersisted;
|
|
|
|
|
2017-07-11 00:46:28 +03:00
|
|
|
/**
|
2018-02-09 23:17:26 +03:00
|
|
|
* The detected duration of the hang in milliseconds.
|
2017-07-11 00:46:28 +03:00
|
|
|
*/
|
2018-02-09 23:17:26 +03:00
|
|
|
readonly attribute double duration;
|
2017-07-11 00:46:28 +03:00
|
|
|
|
|
|
|
/**
|
2017-07-20 21:31:56 +03:00
|
|
|
* The name of the thread which hung.
|
2017-07-20 21:31:56 +03:00
|
|
|
*/
|
2017-07-20 21:31:56 +03:00
|
|
|
readonly attribute ACString thread;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the runnable which hung if it hung on the main thread.
|
|
|
|
*/
|
|
|
|
readonly attribute ACString runnableName;
|
2017-08-11 10:28:27 +03:00
|
|
|
|
2017-07-20 21:31:56 +03:00
|
|
|
/**
|
|
|
|
* The type of process which produced the hang. This should be either:
|
|
|
|
* "default", "content", or "gpu".
|
|
|
|
*/
|
|
|
|
readonly attribute ACString process;
|
|
|
|
|
2017-08-28 20:24:48 +03:00
|
|
|
/**
|
|
|
|
* The remote type of the content process which produced the hang.
|
|
|
|
*/
|
|
|
|
readonly attribute AString remoteType;
|
|
|
|
|
2017-07-20 21:31:56 +03:00
|
|
|
/**
|
|
|
|
* Returns the stack which was captured by BHR. The offset is encoded as a hex
|
|
|
|
* string, as it can contain numbers larger than JS can hold losslessly.
|
|
|
|
*
|
|
|
|
* This value takes the following form:
|
|
|
|
* [ [moduleIndex, offset], ... ]
|
|
|
|
*/
|
|
|
|
[implicit_jscontext] readonly attribute jsval stack;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the modules which were captured by BHR.
|
|
|
|
*
|
|
|
|
* This value takes the following form:
|
|
|
|
* [ ["fileName", "BreakpadId"], ... ]
|
|
|
|
*/
|
|
|
|
[implicit_jscontext] readonly attribute jsval modules;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The hang annotations which were captured when the hang occured. This
|
|
|
|
* attribute is a JS object of key-value pairs.
|
|
|
|
*/
|
|
|
|
[implicit_jscontext] readonly attribute jsval annotations;
|
|
|
|
};
|