Commit fd0b8eee authored by tnagel@chromium.org's avatar tnagel@chromium.org

Add debug code to help understand SEGV in ~ErrorScreen.

BUG=396557

Review URL: https://codereview.chromium.org/424613003

Cr-Commit-Position: refs/heads/master@{#289279}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289279 0039d316-1c4b-4281-b951-d872f2087c98
parent 57aa58c5
...@@ -11,20 +11,29 @@ ...@@ -11,20 +11,29 @@
#include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/cros_settings.h"
namespace {
void* const kCanaryConstant = (void*)0xbaddecafbaddecafLLU;
}
namespace chromeos { namespace chromeos {
ErrorScreen::ErrorScreen(ScreenObserver* screen_observer, ErrorScreen::ErrorScreen(ScreenObserver* screen_observer,
ErrorScreenActor* actor) ErrorScreenActor* actor)
: WizardScreen(screen_observer), : WizardScreen(screen_observer),
canary_1_(kCanaryConstant),
actor_(actor), actor_(actor),
canary_2_(kCanaryConstant),
parent_screen_(OobeDisplay::SCREEN_UNKNOWN), parent_screen_(OobeDisplay::SCREEN_UNKNOWN),
weak_factory_(this) { weak_factory_(this) {
DCHECK(actor_); CHECK(actor_);
actor_->SetDelegate(this); actor_->SetDelegate(this);
} }
ErrorScreen::~ErrorScreen() { ErrorScreen::~ErrorScreen() {
if (actor_) CHECK(this);
CHECK(canary_1_ == kCanaryConstant);
CHECK(canary_2_ == kCanaryConstant);
CHECK(actor_);
actor_->SetDelegate(NULL); actor_->SetDelegate(NULL);
} }
......
...@@ -103,7 +103,9 @@ class ErrorScreen : public WizardScreen, ...@@ -103,7 +103,9 @@ class ErrorScreen : public WizardScreen,
void StartGuestSessionAfterOwnershipCheck( void StartGuestSessionAfterOwnershipCheck(
DeviceSettingsService::OwnershipStatus ownership_status); DeviceSettingsService::OwnershipStatus ownership_status);
void* volatile canary_1_; // For debugging of https://crbug.com/396557.
ErrorScreenActor* actor_; ErrorScreenActor* actor_;
void* volatile canary_2_;
OobeDisplay::Screen parent_screen_; OobeDisplay::Screen parent_screen_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment