зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1412858 P1 Expose a "parsed" ServiceWorkerState value. r=baku
This commit is contained in:
Родитель
3654b248ac
Коммит
757be4f470
|
@ -31,12 +31,13 @@ interface nsIWorkerDebugger;
|
|||
interface nsIServiceWorkerInfo : nsISupports
|
||||
{
|
||||
// State values below should match the ServiceWorkerState enumeration.
|
||||
const unsigned short STATE_INSTALLING = 0;
|
||||
const unsigned short STATE_INSTALLED = 1;
|
||||
const unsigned short STATE_ACTIVATING = 2;
|
||||
const unsigned short STATE_ACTIVATED = 3;
|
||||
const unsigned short STATE_REDUNDANT = 4;
|
||||
const unsigned short STATE_UNKNOWN = 5;
|
||||
const unsigned short STATE_PARSED = 0;
|
||||
const unsigned short STATE_INSTALLING = 1;
|
||||
const unsigned short STATE_INSTALLED = 2;
|
||||
const unsigned short STATE_ACTIVATING = 3;
|
||||
const unsigned short STATE_ACTIVATED = 4;
|
||||
const unsigned short STATE_REDUNDANT = 5;
|
||||
const unsigned short STATE_UNKNOWN = 6;
|
||||
|
||||
readonly attribute DOMString scriptSpec;
|
||||
readonly attribute DOMString cacheName;
|
||||
|
|
|
@ -26,6 +26,9 @@ interface ServiceWorker : EventTarget {
|
|||
ServiceWorker implements AbstractWorker;
|
||||
|
||||
enum ServiceWorkerState {
|
||||
// https://github.com/w3c/ServiceWorker/issues/1162
|
||||
"parsed",
|
||||
|
||||
"installing",
|
||||
"installed",
|
||||
"activating",
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
BEGIN_WORKERS_NAMESPACE
|
||||
|
||||
static_assert(nsIServiceWorkerInfo::STATE_PARSED == static_cast<uint16_t>(ServiceWorkerState::Parsed),
|
||||
"ServiceWorkerState enumeration value should match state values from nsIServiceWorkerInfo.");
|
||||
static_assert(nsIServiceWorkerInfo::STATE_INSTALLING == static_cast<uint16_t>(ServiceWorkerState::Installing),
|
||||
"ServiceWorkerState enumeration value should match state values from nsIServiceWorkerInfo.");
|
||||
static_assert(nsIServiceWorkerInfo::STATE_INSTALLED == static_cast<uint16_t>(ServiceWorkerState::Installed),
|
||||
|
|
Загрузка…
Ссылка в новой задаче