/* -*- 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/. */
namespace mozilla { class AbstractThread; namespace dom {
class CustomElementReactionsStack; class JSExecutionManager;
// Two browsing contexts are considered "related" if they are reachable from one // another through window.opener, window.parent, or window.frames. This is the // spec concept of a browsing context group. // // Two browsing contexts are considered "similar-origin" if they can be made to // have the same origin by setting document.domain. This is the spec concept of // a "unit of similar-origin related browsing contexts" // // A BrowsingContextGroup is a set of browsing contexts which are all // "related". Within a BrowsingContextGroup, browsing contexts are // broken into "similar-origin" DocGroups. A DocGroup is a member // of exactly one BrowsingContextGroup. class DocGroup final { public: typedef nsTArray<Document*>::iterator Iterator;
// Returns NS_ERROR_FAILURE and sets |aString| to an empty string if the TLD // service isn't available. Returns NS_OK on success, but may still set // |aString| may still be set to an empty string.
[[nodiscard]] static nsresult GetKey(nsIPrincipal* aPrincipal, bool aCrossOriginIsolated,
nsACString& aKey);
// Adding documents to a DocGroup should be done through // BrowsingContextGroup::AddDocument (which in turn calls // DocGroup::AddDocument). void AddDocument(Document* aDocument);
// Removing documents from a DocGroup should be done through // BrowsingContextGroup::RemoveDocument(which in turn calls // DocGroup::RemoveDocument). void RemoveDocument(Document* aDocument);
// Iterators for iterating over every document within the DocGroup
Iterator begin() {
MOZ_ASSERT(NS_IsMainThread()); return mDocuments.begin();
}
Iterator end() {
MOZ_ASSERT(NS_IsMainThread()); return mDocuments.end();
}
// Return a pointer that can be continually checked to see if access to this // DocGroup is valid. This pointer should live at least as long as the // DocGroup. bool* GetValidAccessPtr();
// Append aSlot to the list of signal slot list, and queue a mutation observer // microtask. void SignalSlotChange(HTMLSlotElement& aSlot);
// non-null if the JS execution for this docgroup is regulated with regards // to worker threads. This should only be used when we are forcing serialized // SAB access.
RefPtr<JSExecutionManager> mExecutionManager;
// Each DocGroup has a persisted agent cluster ID. const nsID mAgentClusterId;
RefPtr<mozilla::dom::DOMArena> mArena;
};
} // namespace dom
} // namespace mozilla
#endif// defined(DocGroup_h)
¤ Dauer der Verarbeitung: 0.34 Sekunden
(vorverarbeitet)
¤
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 ist noch experimentell.