Fix a crash and possible memory leak in AutoplayUmaHelper
There's a crash in AutoplayUmaHelper::onVisibilityChangedForVideoMutedPlayMethod(). It might be possible that the callback is called after the observer is released. This CL adds additional nullcheck to avoid the crash. This CL also fixes a possible memory leak by changing wrapPersistent to wrapWeakPersistent. BUG=638595 Review-Url: https://codereview.chromium.org/2249223003 Cr-Commit-Position: refs/heads/master@{#412574}
Showing
Please register or sign in to comment