michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * Utilities for integrating the JSInspector object into an XPCOM michael@0: * application. michael@0: */ michael@0: [scriptable, uuid(6758d0d7-e96a-4c5c-bca8-3bcbe5a15943)] michael@0: interface nsIJSInspector : nsISupports michael@0: { michael@0: /** michael@0: * Process the thread's event queue until exit. michael@0: * michael@0: * @param requestor A token the requestor passes to identify the pause. michael@0: * michael@0: * @return depth Returns the number of times the event loop michael@0: * has been nested using this API. michael@0: */ michael@0: unsigned long enterNestedEventLoop(in jsval requestor); michael@0: michael@0: /** michael@0: * Exits the current nested event loop. michael@0: * michael@0: * @return depth The number of nested event loops left after michael@0: * exiting the event loop. michael@0: * michael@0: * @throws NS_ERROR_FAILURE if there are no nested event loops michael@0: * running. michael@0: */ michael@0: unsigned long exitNestedEventLoop(); michael@0: michael@0: readonly attribute unsigned long eventLoopNestLevel; michael@0: michael@0: /** michael@0: * The token provided by the actor that last requested a nested event loop. michael@0: */ michael@0: readonly attribute jsval lastNestRequestor; michael@0: };