Commit 10fd4516 authored by bungeman's avatar bungeman Committed by Commit bot

Revert of Fix Presentation API mocks: do not eagerly drop clients. (patchset...

Revert of Fix Presentation API mocks: do not eagerly drop clients. (patchset #2 id:20001 of https://codereview.chromium.org/938033002/)

Reason for revert:
This change appears to be causing failures in running layout tests ('webkit_tests' step) of Windows 7 and Linux debug builds. See http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20MSAN/builds/1363 or http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20%28dbg%29/builds/9658 .

Original issue's description:
> Fix Presentation API mocks: do not drop eagerly drop clients.
>
> BUG=412331
>
> Committed: https://crrev.com/4ff204b8d2637af0abd8a05485e5941af8ef4271
> Cr-Commit-Position: refs/heads/master@{#317057}

TBR=mkwst@chromium.org,avayvod@chromium.org,mlamouri@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=412331

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

Cr-Commit-Position: refs/heads/master@{#317099}
parent 446bce0a
...@@ -20,7 +20,7 @@ MockPresentationClient::MockPresentationClient(MockPresentationService* service) ...@@ -20,7 +20,7 @@ MockPresentationClient::MockPresentationClient(MockPresentationService* service)
MockPresentationClient::~MockPresentationClient() { MockPresentationClient::~MockPresentationClient() {
DCHECK(!controller_); DCHECK(!controller_);
DCHECK(service_); if (service_)
service_->UnregisterPresentationClientMock(this); service_->UnregisterPresentationClientMock(this);
} }
...@@ -38,6 +38,7 @@ void MockPresentationClient::SetScreenAvailability(bool available) { ...@@ -38,6 +38,7 @@ void MockPresentationClient::SetScreenAvailability(bool available) {
void MockPresentationClient::Reset() { void MockPresentationClient::Reset() {
screen_availability_ = false; screen_availability_ = false;
service_ = nullptr;
} }
void MockPresentationClient::setController( void MockPresentationClient::setController(
......
...@@ -29,6 +29,7 @@ void MockPresentationService::SetScreenAvailability(bool available) { ...@@ -29,6 +29,7 @@ void MockPresentationService::SetScreenAvailability(bool available) {
void MockPresentationService::Reset() { void MockPresentationService::Reset() {
FOR_EACH_OBSERVER(MockPresentationClient, presentation_clients_, Reset()); FOR_EACH_OBSERVER(MockPresentationClient, presentation_clients_, Reset());
presentation_clients_.Clear();
screen_availability_ = false; screen_availability_ = false;
} }
......
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