1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 #ifndef mozilla_dom_workers_WorkerStatus_h
8 #define mozilla_dom_workers_WorkerStatus_h
10 namespace mozilla::dom
{
13 * Use this chart to help figure out behavior during each of the closing
14 * statuses. Details below.
16 * +========================================================+
17 * | Closing Statuses |
18 * +=============+=============+=================+==========+
19 * | status | clear queue | abort execution | notified |
20 * +=============+=============+=================+==========+
21 * | Closing | yes | no | no |
22 * +-------------+-------------+-----------------+----------+
23 * | Canceling | yes | yes | yes |
24 * +-------------+-------------+-----------------+----------+
25 * | Killing | yes | yes | yes |
26 * +-------------+-------------+-----------------+----------+
33 // This status means that the worker is active.
36 // Inner script called close() on the worker global scope. Setting this
37 // status causes the worker to clear its queue of events but does not abort
38 // the currently running script. WorkerRef objects are not going to be
39 // notified because the behavior of APIs/Components should not change during
43 // Either the user navigated away from the owning page or the owning page fell
44 // out of bfcache. Setting this status causes the worker to abort immediately.
45 // Since the page has gone away the worker may not post any messages.
48 // The application is shutting down. Setting this status causes the worker to
52 // The worker is effectively dead.
56 } // namespace mozilla::dom
58 #endif /* mozilla_dom_workers_WorkerStatus_h */