Fix destruction order in HeadlessWebContentsImpl for BackupRefPtr
When BackupRefPtr is used for HeadlessWebContentsImpl::browser_context_, the destruction order of the fields causes a null dereference. HeadlessWebContentsImpl::RenderFrameDeleted() gets called in ~HeadlessWebContentsImpl(), so the HeadlessWebContentsImpl is half destroyed and browser_context_ is null when it is called. Bug: 1080832 Change-Id: I8ca260f175cc3a31115c63ecf62b05f1c1f7bc94 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563515Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Bartek Nowierski <bartekn@chromium.org> Reviewed-by:
Peter Kvitek <kvitekp@chromium.org> Commit-Queue: Keishi Hattori <keishi@chromium.org> Cr-Commit-Position: refs/heads/master@{#834545}
Showing
Please register or sign in to comment