Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #601 from brave/OnMainFrameReadyToCommitNavigation…
Browse files Browse the repository at this point in the history
…-Crash

 Explicitly calling `ExtensionWebContentsObserver::Initialize`
  • Loading branch information
bridiver authored May 30, 2018
2 parents 7c92450 + 56d6356 commit fa2decc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ AtomExtensionWebContentsObserver::AtomExtensionWebContentsObserver(

AtomExtensionWebContentsObserver::~AtomExtensionWebContentsObserver() {}

void AtomExtensionWebContentsObserver::CreateForWebContents(
content::WebContents* web_contents) {
content::WebContentsUserData<
AtomExtensionWebContentsObserver>::CreateForWebContents(web_contents);

// Initialize this instance if necessary.
FromWebContents(web_contents)->Initialize();
}

void AtomExtensionWebContentsObserver::RenderFrameCreated(
content::RenderFrameHost* render_frame_host) {
ExtensionWebContentsObserver::RenderFrameCreated(render_frame_host);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class AtomExtensionWebContentsObserver
public:
~AtomExtensionWebContentsObserver() override;

// Creates and initializes an instance of this class for the given
// |web_contents|, if it doesn't already exist.
static void CreateForWebContents(content::WebContents* web_contents);

private:
friend class content::WebContentsUserData<AtomExtensionWebContentsObserver>;

Expand Down

0 comments on commit fa2decc

Please sign in to comment.