Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1087)

Unified Diff: content/shell/renderer/test_runner/mock_presentation_client.cc

Issue 940783003: Revert of Fix Presentation API mocks: do not eagerly drop clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/mock_presentation_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/mock_presentation_client.cc
diff --git a/content/shell/renderer/test_runner/mock_presentation_client.cc b/content/shell/renderer/test_runner/mock_presentation_client.cc
index eb1d4ff6284215e801a3f03aa41164e545276afc..02012bca821851a92d8e266e1e6c1aedfc266c70 100644
--- a/content/shell/renderer/test_runner/mock_presentation_client.cc
+++ b/content/shell/renderer/test_runner/mock_presentation_client.cc
@@ -20,8 +20,8 @@
MockPresentationClient::~MockPresentationClient() {
DCHECK(!controller_);
- DCHECK(service_);
- service_->UnregisterPresentationClientMock(this);
+ if (service_)
+ service_->UnregisterPresentationClientMock(this);
}
void MockPresentationClient::SetScreenAvailability(bool available) {
@@ -38,6 +38,7 @@
void MockPresentationClient::Reset() {
screen_availability_ = false;
+ service_ = nullptr;
}
void MockPresentationClient::setController(
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/mock_presentation_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698