Bug 1660470 - Split SerializedStructuredCloneBuffer.h from IPCMessageUtils.h. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D93550

Depends on D93546
This commit is contained in:
Simon Giesecke 2020-11-23 16:05:26 +00:00
Родитель 5b3084384e
Коммит dc800202a2
6 изменённых файлов: 54 добавлений и 31 удалений

Просмотреть файл

@ -36,7 +36,7 @@ using mozilla::dom::quota::PersistenceType
from "mozilla/dom/quota/PersistenceType.h";
using moveonly mozilla::SerializedStructuredCloneBuffer
from "ipc/IPCMessageUtils.h";
from "mozilla/ipc/SerializedStructuredCloneBuffer.h";
namespace mozilla {
namespace dom {

Просмотреть файл

@ -17,7 +17,7 @@ include ProtocolTypes;
using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
using moveonly struct mozilla::SerializedStructuredCloneBuffer
from "ipc/IPCMessageUtils.h";
from "mozilla/ipc/SerializedStructuredCloneBuffer.h";
using class mozilla::dom::LoadingSessionHistoryInfo
from "mozilla/dom/SessionHistoryEntry.h";

Просмотреть файл

@ -6,7 +6,6 @@
#include "StructuredCloneData.h"
#include "ipc/IPCMessageUtils.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/BlobBinding.h"
#include "mozilla/dom/BlobImpl.h"
@ -15,6 +14,7 @@
#include "mozilla/dom/IPCBlobUtils.h"
#include "mozilla/ipc/BackgroundParent.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/SerializedStructuredCloneBuffer.h"
#include "nsContentUtils.h"
#include "nsJSEnvironment.h"
#include "MainThreadUtils.h"

Просмотреть файл

@ -15,6 +15,7 @@
#include "mozilla/DebugOnly.h"
#include "mozilla/dom/ipc/StructuredCloneData.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/SerializedStructuredCloneBuffer.h"
#include "mozilla/BitSet.h"
#include "mozilla/EnumSet.h"
#include "mozilla/EnumTypeTraits.h"
@ -44,7 +45,6 @@
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "js/StructuredClone.h"
#include "nsCSSPropertyID.h"
#ifdef _MSC_VER
@ -72,33 +72,6 @@ struct VariantTag;
}
} // namespace mozilla
namespace mozilla {
struct SerializedStructuredCloneBuffer final {
SerializedStructuredCloneBuffer() = default;
SerializedStructuredCloneBuffer(SerializedStructuredCloneBuffer&&) = default;
SerializedStructuredCloneBuffer& operator=(
SerializedStructuredCloneBuffer&&) = default;
SerializedStructuredCloneBuffer(const SerializedStructuredCloneBuffer&) =
delete;
SerializedStructuredCloneBuffer& operator=(
const SerializedStructuredCloneBuffer& aOther) = delete;
bool operator==(const SerializedStructuredCloneBuffer& aOther) const {
// The copy assignment operator and the equality operator are
// needed by the IPDL generated code. We relied on the copy
// assignment operator at some places but we never use the
// equality operator.
return false;
}
JSStructuredCloneData data{JS::StructuredCloneScope::Unassigned};
};
} // namespace mozilla
namespace IPC {
/**

Просмотреть файл

@ -0,0 +1,49 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 http://mozilla.org/MPL/2.0/. */
#ifndef __IPC_GLUE_SERIALIZEDSTRUCTUREDCLONEBUFFER_H__
#define __IPC_GLUE_SERIALIZEDSTRUCTUREDCLONEBUFFER_H__
#include "js/StructuredClone.h"
namespace mozilla {
template <typename...>
class Variant;
namespace detail {
template <typename...>
struct VariantTag;
}
} // namespace mozilla
namespace mozilla {
struct SerializedStructuredCloneBuffer final {
SerializedStructuredCloneBuffer() = default;
SerializedStructuredCloneBuffer(SerializedStructuredCloneBuffer&&) = default;
SerializedStructuredCloneBuffer& operator=(
SerializedStructuredCloneBuffer&&) = default;
SerializedStructuredCloneBuffer(const SerializedStructuredCloneBuffer&) =
delete;
SerializedStructuredCloneBuffer& operator=(
const SerializedStructuredCloneBuffer& aOther) = delete;
bool operator==(const SerializedStructuredCloneBuffer& aOther) const {
// The copy assignment operator and the equality operator are
// needed by the IPDL generated code. We relied on the copy
// assignment operator at some places but we never use the
// equality operator.
return false;
}
JSStructuredCloneData data{JS::StructuredCloneScope::Unassigned};
};
} // namespace mozilla
#endif /* __IPC_GLUE_SERIALIZEDSTRUCTUREDCLONEBUFFER_H__ */

Просмотреть файл

@ -46,6 +46,7 @@ EXPORTS.mozilla.ipc += [
"ProtocolUtils.h",
"ProtocolUtilsFwd.h",
"ScopedXREEmbed.h",
"SerializedStructuredCloneBuffer.h",
"SharedMemory.h",
"SharedMemoryBasic.h",
"Shmem.h",