Make sure BrowserContext is always destroyed after WebContents
This commit is contained in:
parent
242508e22f
commit
118afab67b
3 changed files with 11 additions and 4 deletions
|
@ -19,6 +19,7 @@ using brightray::DevToolsFileSystemIndexer;
|
|||
|
||||
namespace atom {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class AtomJavaScriptDialogManager;
|
||||
class NativeWindow;
|
||||
class WebDialogHelper;
|
||||
|
@ -33,7 +34,8 @@ class CommonWebContentsDelegate
|
|||
|
||||
// Creates a InspectableWebContents object and takes onwership of
|
||||
// |web_contents|.
|
||||
void InitWithWebContents(content::WebContents* web_contents);
|
||||
void InitWithWebContents(content::WebContents* web_contents,
|
||||
AtomBrowserContext* browser_context);
|
||||
|
||||
// Set the window as owner window.
|
||||
void SetOwnerWindow(NativeWindow* owner_window);
|
||||
|
@ -145,6 +147,9 @@ class CommonWebContentsDelegate
|
|||
scoped_ptr<AtomJavaScriptDialogManager> dialog_manager_;
|
||||
scoped_refptr<DevToolsFileSystemIndexer> devtools_file_system_indexer_;
|
||||
|
||||
// Make sure BrowserContext is alwasys destroyed after WebContents.
|
||||
scoped_refptr<AtomBrowserContext> browser_context_;
|
||||
|
||||
// The stored InspectableWebContents object.
|
||||
// Notice that web_contents_ must be placed after dialog_manager_, so we can
|
||||
// make sure web_contents_ is destroyed before dialog_manager_, otherwise a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue