[IntersectionObserver] Deliver non-js callbacks synchronously
For the javascript IntersectionObserver class, when new notifications are generated, a task is posted to deliver the notifications (i.e., run the javascript callback). Because the task is put in the regular task queue, there's no guarantee when it will run. For blink-internal users of IntersectionObserver, it doesn't make sense to post a task to deliver the observations -- and this may even lead to correctness issues or other bugs. The bug link on this CL refers to an old bug of this kind which was previously fixed using a gross but necessary hack. This patch changes IntersectionObserver so that non-javascript observers will deliver notifications synchronously as they are generated. R=chrishtr@chromium.org,mlamouri@chromium.org Bug: 590856 Change-Id: I2f91f23a01288214209f901bc582717678312dd6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1501655 Commit-Queue: Stefan Zager <szager@chromium.org> Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#637919}
Showing
Please register or sign in to comment