author Dylan Roeh <>
Tue, 28 Aug 2018 11:35:46 -0500
changeset 481113 31683bdf39d7bcacf8d9bf265fc2365024473fbe
parent 462276 43c8c3b917ea151d00dda882ff3b4d39e0befbf1
child 482480 7b59a210a7da4a414e91d2a22cee01311f82f350
permissions -rw-r--r--
Bug 1485178 - Only migrate sharedprefs when in Fennec. r=snorp a=ritu

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

include PBackgroundSharedTypes;
include IPCServiceWorkerDescriptor;

using ServiceWorkerUpdateViaCache from "mozilla/dom/ServiceWorkerIPCUtils.h";

namespace mozilla {
namespace dom {

// IPC type with enough information to create a ServiceWorker DOM object
// in a child process.  Note that the state may be slightly out-of-sync
// with the parent and should be updated dynamically if necessary.
struct IPCServiceWorkerRegistrationDescriptor
  uint64_t id;

  // These values should match the principal and scope in each
  // associated worker.  It may be possible to optimize in the future,
  // but for now we duplicate the information here to ensure correctness.
  // Its possible we may need to reference a registration before the
  // worker is installed yet, etc.
  PrincipalInfo principalInfo;
  nsCString scope;

  ServiceWorkerUpdateViaCache updateViaCache;

  OptionalIPCServiceWorkerDescriptor installing;
  OptionalIPCServiceWorkerDescriptor waiting;
  OptionalIPCServiceWorkerDescriptor active;

} // namespace dom
} // namespace mozilla