Stabilize and align Intersection Observers

- Fixes several crashes
- Aligns the feature with the W3C WD spec

Tag #249
This commit is contained in:
wolfbeast 2018-06-27 16:00:53 +02:00 committed by Roy Tam
commit 5af4107852
9 changed files with 111 additions and 64 deletions

View file

@ -12507,7 +12507,8 @@ nsDocument::ScheduleIntersectionObserverNotification()
void
nsDocument::NotifyIntersectionObservers()
{
for (const auto& observer : mIntersectionObservers) {
nsTArray<RefPtr<DOMIntersectionObserver>> observers(mIntersectionObservers);
for (const auto& observer : observers) {
observer->Notify();
}
}