зеркало из https://github.com/mozilla/gecko-dev.git
4265f72859
Deletion of mutation observers from a list resulted in O(n^2) behavior and could lead to massive freezes. This is resolved by using a LinkedList instead, reducing complexity to O(n). A safely iterable doubly linked list was implemented based on `mozilla::DoublyLinkedList`, allowing to insert and remove elements while iterating the list. Due to the nature of `mozilla::DoublyLinkedList`, every Mutation Observer now inherits `mozilla::DoublyLinkedListElement<T>`. This implies that a Mutation Observer can only be part of one DoublyLinkedList. This conflicts with some Mutation Observers, which are being added to multiple `nsINode`s. To continue supporting this, new MutationObserver base classes `nsMultiMutationObserver` and `nsStubMultiMutationObserver` are introduced, which create `MutationObserverWrapper` objects each time they are added to a `nsINode`. The wrapper objects forward every call to the actual observer. Differential Revision: https://phabricator.services.mozilla.com/D157031 |
||
---|---|---|
.. | ||
AutoEntryScript.cpp | ||
AutoEntryScript.h | ||
ModuleLoader.cpp | ||
ModuleLoader.h | ||
ScriptCompression.cpp | ||
ScriptCompression.h | ||
ScriptDecoding.h | ||
ScriptElement.cpp | ||
ScriptElement.h | ||
ScriptLoadContext.cpp | ||
ScriptLoadContext.h | ||
ScriptLoadHandler.cpp | ||
ScriptLoadHandler.h | ||
ScriptLoader.cpp | ||
ScriptLoader.h | ||
ScriptSettings.cpp | ||
ScriptSettings.h | ||
ScriptTrace.h | ||
ShadowRealmGlobalScope.cpp | ||
ShadowRealmGlobalScope.h | ||
moz.build | ||
nsIScriptElement.cpp | ||
nsIScriptElement.h | ||
nsIScriptLoaderObserver.idl |