Bug 1121623 part 1. Switch PromiseDebugging to being a namespace, since that's how we use it. r=peterv

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-05-24 07:13:16 +00:00
parent 67f2383419
commit 28c8e552a8
2 changed files with 8 additions and 12 deletions

View File

@ -693,10 +693,6 @@ DOMInterfaces = {
'headerFile': 'nsGeoPosition.h'
},
'PromiseDebugging': {
'concrete': False,
},
'PromiseNativeHandler': {
'wrapperCache': False,
},

View File

@ -51,7 +51,7 @@ callback interface UncaughtRejectionObserver {
};
[ChromeOnly, Exposed=Window]
interface PromiseDebugging {
namespace PromiseDebugging {
/**
* The various functions on this interface all expect to take promises but
* don't want the WebIDL behavior of assimilating random passed-in objects
@ -65,21 +65,21 @@ interface PromiseDebugging {
* Get the current state of the given promise.
*/
[Throws]
static PromiseDebuggingStateHolder getState(object p);
PromiseDebuggingStateHolder getState(object p);
/**
* Return an identifier for a promise. This identifier is guaranteed
* to be unique to the current process.
*/
[Throws]
static DOMString getPromiseID(object p);
DOMString getPromiseID(object p);
/**
* Return the stack to the promise's allocation point. This can
* return null if the promise was not created from script.
*/
[Throws]
static object? getAllocationStack(object p);
object? getAllocationStack(object p);
/**
* Return the stack to the promise's rejection point, if the
@ -87,7 +87,7 @@ interface PromiseDebugging {
* promise has not been rejected or was not rejected from script.
*/
[Throws]
static object? getRejectionStack(object p);
object? getRejectionStack(object p);
/**
* Return the stack to the promise's fulfillment point, if the
@ -95,7 +95,7 @@ interface PromiseDebugging {
* promise has not been fulfilled or was not fulfilled from script.
*/
[Throws]
static object? getFullfillmentStack(object p);
object? getFullfillmentStack(object p);
/**
* Watching uncaught rejections on the current thread.
@ -103,6 +103,6 @@ interface PromiseDebugging {
* Adding an observer twice will cause it to be notified twice
* of events.
*/
static void addUncaughtRejectionObserver(UncaughtRejectionObserver o);
static boolean removeUncaughtRejectionObserver(UncaughtRejectionObserver o);
void addUncaughtRejectionObserver(UncaughtRejectionObserver o);
boolean removeUncaughtRejectionObserver(UncaughtRejectionObserver o);
};