1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
13 * When a content process hangs, Gecko notifies "process-hang-report" observers
14 * and passes an nsIHangReport for the subject parameter. There is at most one
15 * nsIHangReport associated with a given content process. As long as the content
16 * process stays stuck, the "process-hang-report" observer will continue to be
17 * notified at regular intervals (approximately once per second). The content
18 * process will continue to run uninhibitedly during this time.
21 [scriptable
, uuid(5fcffbb9
-be62
-49b1
-b8a1
-36e820787a74
)]
22 interface nsIHangReport
: nsISupports
24 readonly attribute Element scriptBrowser
;
25 readonly attribute ACString scriptFileName
;
26 // Duration of the hang so far.
27 readonly attribute
double hangDuration
;
28 readonly attribute AString addonId
;
30 // The child id of the process in which the hang happened.
31 readonly attribute
unsigned long long childID
;
33 // Called by front end code when user ignores or cancels
37 // Terminate the slow script if it is still running.
38 void terminateScript
();
40 // Ask the content process to start up the slow script debugger.
41 void beginStartingDebugger
();
43 // Inform the content process that the slow script debugger has finished
44 // spinning up. The content process will run a nested event loop until this
46 void endStartingDebugger
();
48 // Inquire whether the report is for a content process loaded by the given
49 // frameloader, or any descendents in its BrowsingContext tree.
50 boolean isReportForBrowserOrChildren
(in FrameLoader aFrameLoader
);