/* -*- 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/. */
// XXX This is currently used for a number of reasons. Bug 1620560 will remove // the need for one of them, but the uses of do_GetWeakReference in // IDBDatabase::GetOrCreateFileActorForBlob and WrapAsJSObject in // CopyingStructuredCloneReadCallback are probably harder to change.
dom::Blob& MutableBlob() const { return *mContents->as<RefPtr<dom::Blob>>(); }
// In IndexedDatabaseInlines.h
RefPtr<dom::Blob> BlobPtr() const;
// In IndexedDatabaseInlines.h
StructuredCloneFileParent(FileType aType,
SafeRefPtr<DatabaseFileInfo> aFileInfo);
// In IndexedDatabaseInlines.h
~StructuredCloneFileParent();
// XXX This is used for a schema upgrade hack in UpgradeSchemaFrom19_0To20_0. // When this is eventually removed, this function can be removed, and mType // can be declared const in the base class. void MutateType(FileType aNewType) { mType = aNewType; }
// In IndexedDatabaseInlines.h explicit StructuredCloneReadInfo(JS::StructuredCloneScope aScope);
// In IndexedDatabaseInlines.h
StructuredCloneReadInfo();
// In IndexedDatabaseInlines.h
StructuredCloneReadInfo(JSStructuredCloneData&& aData,
nsTArray<StructuredCloneFile> aFiles);
#ifdef NS_BUILD_REFCNT_LOGGING // In IndexedDatabaseInlines.h
~StructuredCloneReadInfo();
// In IndexedDatabaseInlines.h // // This custom implementation of the move ctor is only necessary because of // MOZ_COUNT_CTOR. It is less efficient as the compiler-generated move ctor, // since it unnecessarily clears elements on the source.
StructuredCloneReadInfo(StructuredCloneReadInfo&& aOther) noexcept; #else
StructuredCloneReadInfo(StructuredCloneReadInfo&& aOther) = default; #endif
StructuredCloneReadInfo& operator=(StructuredCloneReadInfo&& aOther) = default;
// Returns the estimated size used for IPC message size calculations, not the // actual size of the data. This estimation accounts for serialization // behavior of large data. // Defined in IndexedDatabaseInlines.h
size_t Size() const;
// XXX This is only needed for a schema upgrade (UpgradeSchemaFrom19_0To20_0). // If support for older schemas is dropped, we can probably remove this method // and make mFiles InitializedOnce.
StructuredCloneFile& MutableFile(const size_t aIndex) { return mFiles[aIndex];
} const nsTArray<StructuredCloneFile>& Files() const { return mFiles; }
// This is only defined in the header file to satisfy the clang-plugin static // analysis, it could be placed in ActorsParent.cpp otherwise. struct StructuredCloneReadInfoParent
: StructuredCloneReadInfo<StructuredCloneFileParent> {
StructuredCloneReadInfoParent(JSStructuredCloneData&& aData,
nsTArray<StructuredCloneFileParent> aFiles, bool aHasPreprocessInfo)
: StructuredCloneReadInfo{std::move(aData), std::move(aFiles)},
mHasPreprocessInfo{aHasPreprocessInfo} {}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.