• Yuki Shiino's avatar
    MutationObserver: Do nothing when its execution context is no longer available. · 9e4a1523
    Yuki Shiino authored
    MutationObserver::DeliverMutations is a static function and
    registered to the microtask queue.  It maintains active
    observers and also makes active observers alive, but nothing
    else (the underlying callback function nor execution context).
    
    So, when DeliverMutations invokes each active observer,
    DeliverMutations must make sure that each active observer's
    execution context is still available.
    
    This patch adds the check of the execution context.
    
    Bug: 788495, 789862
    Change-Id: Ic350603cc8a7b13275adf042e731fdd9605373aa
    Reviewed-on: https://chromium-review.googlesource.com/799653
    Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#520509}
    9e4a1523
weak-callback-gc-crash-case2.html 1.13 KB