Make devtools_web_contents_ is destroyed before everything

The WebContentsDestroyed still access the other members, so if they are
destroyed before the devtools_web_contents_ in the destructor, we will
crash there.
This commit is contained in:
Cheng Zhao 2015-06-09 10:41:25 +08:00
parent 418264d42a
commit 64c4a34507
2 changed files with 8 additions and 8 deletions

View file

@ -159,10 +159,10 @@ void InspectableWebContentsImpl::RegisterPrefs(PrefRegistrySimple* registry) {
InspectableWebContentsImpl::InspectableWebContentsImpl(
content::WebContents* web_contents)
: web_contents_(web_contents),
frontend_loaded_(false),
: frontend_loaded_(false),
can_dock_(true),
delegate_(nullptr),
web_contents_(web_contents),
weak_factory_(this) {
auto context = static_cast<BrowserContext*>(web_contents_->GetBrowserContext());
auto bounds_dict = context->prefs()->GetDictionary(kDevToolsBoundsPref);