Chromium Code Reviews| Index: extensions/browser/process_manager.cc |
| diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc |
| index 47f7b191e004da8dccf2a6179c9a17a73471752f..d1908d2cd79155947f6e0cf7cffabe739a67f223 100644 |
| --- a/extensions/browser/process_manager.cc |
| +++ b/extensions/browser/process_manager.cc |
| @@ -805,8 +805,8 @@ void ProcessManager::CloseLazyBackgroundPageNow(const std::string& extension_id, |
| } |
| } |
| for (content::RenderFrameHost* frame : frames_to_close) { |
| - frame->GetRenderViewHost()->ClosePage(); |
| - // RenderViewHost::ClosePage() may result in calling |
| + content::WebContents::FromRenderFrameHost(frame)->ClosePage(); |
|
Charlie Reis
2015/04/29 17:31:18
The interstitial CL reminded me that this might re
nasko
2015/04/29 21:15:33
Should we ever be getting a background page RFH th
Charlie Reis
2015/04/29 22:21:48
I hadn't thought of a specific case it could happe
|
| + // WebContents::ClosePage() may result in calling |
| // UnregisterRenderViewHost() asynchronously and may cause race conditions |
| // when the background page is reloaded. |
| // To avoid this, unregister the view now. |