Skip to content

Commit

Permalink
fix: reorder code
Browse files Browse the repository at this point in the history
  • Loading branch information
sentialx committed Jun 5, 2020
1 parent b4ba128 commit 33ebef5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions shell/browser/api/electron_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,6 @@ WebContents::WebContents(v8::Isolate* isolate,
: content::WebContentsObserver(web_contents),
type_(Type::REMOTE),
weak_factory_(this) {
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
extensions::ElectronExtensionWebContentsObserver::CreateForWebContents(
web_contents);
script_executor_.reset(new extensions::ScriptExecutor(web_contents));
#endif

auto session = Session::CreateFrom(isolate, GetBrowserContext());
session_.Reset(isolate, session.ToV8());

Expand All @@ -409,6 +403,12 @@ WebContents::WebContents(v8::Isolate* isolate,
AttachAsUserData(web_contents);
InitZoomController(web_contents, gin::Dictionary::CreateEmpty(isolate));

#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
extensions::ElectronExtensionWebContentsObserver::CreateForWebContents(
web_contents);
script_executor_.reset(new extensions::ScriptExecutor(web_contents));
#endif

registry_.AddInterface(base::BindRepeating(&WebContents::BindElectronBrowser,
base::Unretained(this)));
bindings_.set_connection_error_handler(base::BindRepeating(
Expand Down

0 comments on commit 33ebef5

Please sign in to comment.