Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/ServiceWorkerRegistrarTypes.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ServiceWorkerRegistrationData|
//
namespace mozilla {
namespace dom {
auto ServiceWorkerRegistrationData::StaticAssertions() const -> void
{
static_assert(
(offsetof(ServiceWorkerRegistrationData, lastUpdateTime_) - offsetof(ServiceWorkerRegistrationData, currentWorkerInstalledTime_)) == 16,
"Bad assumptions about field layout!");
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::ServiceWorkerRegistrationData>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).scope());
// Sentinel = 'scope'
(aWriter)->WriteSentinel(107086363);
IPC::WriteParam(aWriter, (aVar).currentWorkerURL());
// Sentinel = 'currentWorkerURL'
(aWriter)->WriteSentinel(955647601);
IPC::WriteParam(aWriter, (aVar).currentWorkerHandlesFetch());
// Sentinel = 'currentWorkerHandlesFetch'
(aWriter)->WriteSentinel(2250312231);
IPC::WriteParam(aWriter, (aVar).cacheName());
// Sentinel = 'cacheName'
(aWriter)->WriteSentinel(289670006);
IPC::WriteParam(aWriter, (aVar).principal());
// Sentinel = 'principal'
(aWriter)->WriteSentinel(319620035);
IPC::WriteParam(aWriter, (aVar).navigationPreloadState());
// Sentinel = 'navigationPreloadState'
(aWriter)->WriteSentinel(1744439545);
(aWriter)->WriteBytes((&((aVar).currentWorkerInstalledTime())), 24);
// Sentinel = 'currentWorkerInstalledTime | currentWorkerActivatedTime | lastUpdateTime'
(aWriter)->WriteSentinel(452992108);
(aWriter)->WriteBytes((&((aVar).updateViaCache())), 2);
// Sentinel = 'updateViaCache'
(aWriter)->WriteSentinel(706348408);
}
auto ParamTraits<::mozilla::dom::ServiceWorkerRegistrationData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___scope = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___scope) {
aReader->FatalError("Error deserializing 'scope' (nsCString) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto& _scope = *maybe___scope;
// Sentinel = 'scope'
if ((!((aReader)->ReadSentinel(107086363)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'scope' (nsCString) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto maybe___currentWorkerURL = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___currentWorkerURL) {
aReader->FatalError("Error deserializing 'currentWorkerURL' (nsCString) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto& _currentWorkerURL = *maybe___currentWorkerURL;
// Sentinel = 'currentWorkerURL'
if ((!((aReader)->ReadSentinel(955647601)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'currentWorkerURL' (nsCString) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto maybe___currentWorkerHandlesFetch = IPC::ReadParam<bool>(aReader);
if (!maybe___currentWorkerHandlesFetch) {
aReader->FatalError("Error deserializing 'currentWorkerHandlesFetch' (bool) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto& _currentWorkerHandlesFetch = *maybe___currentWorkerHandlesFetch;
// Sentinel = 'currentWorkerHandlesFetch'
if ((!((aReader)->ReadSentinel(2250312231)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'currentWorkerHandlesFetch' (bool) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto maybe___cacheName = IPC::ReadParam<::nsString>(aReader);
if (!maybe___cacheName) {
aReader->FatalError("Error deserializing 'cacheName' (nsString) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto& _cacheName = *maybe___cacheName;
// Sentinel = 'cacheName'
if ((!((aReader)->ReadSentinel(289670006)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'cacheName' (nsString) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto maybe___principal = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
if (!maybe___principal) {
aReader->FatalError("Error deserializing 'principal' (PrincipalInfo) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto& _principal = *maybe___principal;
// Sentinel = 'principal'
if ((!((aReader)->ReadSentinel(319620035)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'principal' (PrincipalInfo) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto maybe___navigationPreloadState = IPC::ReadParam<::mozilla::dom::IPCNavigationPreloadState>(aReader);
if (!maybe___navigationPreloadState) {
aReader->FatalError("Error deserializing 'navigationPreloadState' (IPCNavigationPreloadState) member of 'ServiceWorkerRegistrationData'");
return {};
}
auto& _navigationPreloadState = *maybe___navigationPreloadState;
// Sentinel = 'navigationPreloadState'
if ((!((aReader)->ReadSentinel(1744439545)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'navigationPreloadState' (IPCNavigationPreloadState) member of 'ServiceWorkerRegistrationData'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_scope),
std::move(_currentWorkerURL),
std::move(_currentWorkerHandlesFetch),
std::move(_cacheName),
std::move(_principal),
::uint16_t{0},
::int64_t{0},
::int64_t{0},
::int64_t{0},
std::move(_navigationPreloadState)};
if ((!((aReader)->ReadBytesInto((&((result__)->currentWorkerInstalledTime())), 24)))) {
aReader->FatalError("Error bulk reading fields from int64_t");
return {};
}
// Sentinel = 'currentWorkerInstalledTime | currentWorkerActivatedTime | lastUpdateTime'
if ((!((aReader)->ReadSentinel(452992108)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from int64_t");
return {};
}
if ((!((aReader)->ReadBytesInto((&((result__)->updateViaCache())), 2)))) {
aReader->FatalError("Error bulk reading fields from uint16_t");
return {};
}
// Sentinel = 'updateViaCache'
if ((!((aReader)->ReadSentinel(706348408)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint16_t");
return {};
}
return result__;
}
} // namespace IPC