1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include ClientIPCTypes;
6 include IPCServiceWorkerDescriptor;
7 include IPCServiceWorkerRegistrationDescriptor;
8 include PBackgroundSharedTypes;
11 include NeckoChannelParams;
12 include ProtocolTypes;
14 include "mozilla/dom/ClientIPCUtils.h";
15 include "mozilla/dom/ReferrerInfoUtils.h";
16 include "mozilla/dom/WorkerIPCUtils.h";
18 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
19 using mozilla::dom::RequestCredentials from "mozilla/dom/RequestBinding.h";
20 using mozilla::StorageAccess from "mozilla/StorageAccess.h";
21 using mozilla::OriginTrials from "mozilla/OriginTrialsIPCUtils.h";
22 using mozilla::dom::WorkerType from "mozilla/dom/WorkerBinding.h";
27 struct ServiceWorkerData {
28 IPCServiceWorkerDescriptor descriptor;
29 IPCServiceWorkerRegistrationDescriptor registrationDescriptor;
35 union OptionalServiceWorkerData {
40 struct RemoteWorkerData
42 // This should only be used for devtools.
43 nsString originalScriptURL;
45 // It is important to pass these as URIParams instead of strings for blob
46 // URLs: they carry an additional bit of state with them (mIsRevoked) that
47 // gives us a chance to use them, even after they've been revoked. Because
48 // we're asynchronously calling into the parent process before potentially
49 // loading the worker, it is important to keep this state. Note that this
50 // isn't a panacea: once the URL has been revoked, it'll give the worker 5
51 // seconds to actually load it; so it's possible to still fail to load the
52 // blob URL if it takes too long to do the round trip.
53 URIParams baseScriptURL;
54 URIParams resolvedScriptURL;
58 RequestCredentials credentials;
60 PrincipalInfo loadingPrincipalInfo;
61 PrincipalInfo principalInfo;
62 PrincipalInfo partitionedPrincipalInfo;
64 bool useRegularPrincipal;
65 bool usingStorageAccess;
67 CookieJarSettingsArgs cookieJarSettings;
73 IPCClientInfo? clientInfo;
75 nullable nsIReferrerInfo referrerInfo;
77 StorageAccess storageAccess;
79 bool isThirdPartyContextToTopWindow;
81 bool shouldResistFingerprinting;
83 uint64_t? overriddenFingerprintingSettings;
85 OriginTrials originTrials;
87 OptionalServiceWorkerData serviceWorkerData;
91 // Child process remote type where the worker should only run on.
95 // ErrorData/ErrorDataNote correspond to WorkerErrorReport/WorkerErrorNote
96 // which in turn correspond to JSErrorReport/JSErrorNotes which allows JS to
97 // report complicated errors such as redeclarations that involve multiple
98 // distinct lines. For more generic error-propagation IPC structures, see bug
99 // 1357463 on making ErrorResult usable over IPC.
101 struct ErrorDataNote {
103 uint32_t columnNumber;
111 uint32_t columnNumber;
115 ErrorDataNote[] notes;
118 struct CSPViolation {
130 } // namespace mozilla