mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 455314. RemoveIDTargetObserver doesn't need to do the full GetElementByIdInternal because we don't need or want to set up an mIdentifierMap entry if no entry is found for the ID. r+sr=jst
This commit is contained in:
parent
e0206a44c5
commit
9106f372f7
@ -3855,9 +3855,13 @@ nsDocument::RemoveIDTargetObserver(nsIAtom* aID,
|
||||
if (!CheckGetElementByIdArg(aID))
|
||||
return;
|
||||
|
||||
nsIdentifierMapEntry *entry = GetElementByIdInternal(aID);
|
||||
if (!entry)
|
||||
nsIdentifierMapEntry *entry = mIdentifierMap.GetEntry(aID);
|
||||
if (!entry) {
|
||||
// We don't need to do the stuff that GetElementByIdInternal does;
|
||||
// if there's no entry already in mIdentifierMap, then there's no
|
||||
// callback to remove.
|
||||
return;
|
||||
}
|
||||
|
||||
entry->RemoveContentChangeCallback(aObserver, aData);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user