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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp

Issue 2862963003: Replace ASSERT with DCHECK in modules/ (Closed)
Patch Set: NOTREACHED instead of DCHECK(false) Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 WTF_MAKE_NONCOPYABLE(GetRegistrationForReadyCallback); 125 WTF_MAKE_NONCOPYABLE(GetRegistrationForReadyCallback);
126 }; 126 };
127 127
128 ServiceWorkerContainer* ServiceWorkerContainer::Create( 128 ServiceWorkerContainer* ServiceWorkerContainer::Create(
129 ExecutionContext* execution_context, 129 ExecutionContext* execution_context,
130 NavigatorServiceWorker* navigator) { 130 NavigatorServiceWorker* navigator) {
131 return new ServiceWorkerContainer(execution_context, navigator); 131 return new ServiceWorkerContainer(execution_context, navigator);
132 } 132 }
133 133
134 ServiceWorkerContainer::~ServiceWorkerContainer() { 134 ServiceWorkerContainer::~ServiceWorkerContainer() {
135 ASSERT(!provider_); 135 DCHECK(!provider_);
136 } 136 }
137 137
138 void ServiceWorkerContainer::ContextDestroyed(ExecutionContext*) { 138 void ServiceWorkerContainer::ContextDestroyed(ExecutionContext*) {
139 if (provider_) { 139 if (provider_) {
140 provider_->SetClient(0); 140 provider_->SetClient(0);
141 provider_ = nullptr; 141 provider_ = nullptr;
142 } 142 }
143 navigator_->ClearServiceWorker(); 143 navigator_->ClearServiceWorker();
144 } 144 }
145 145
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 if (ServiceWorkerContainerClient* client = 487 if (ServiceWorkerContainerClient* client =
488 ServiceWorkerContainerClient::From(execution_context)) { 488 ServiceWorkerContainerClient::From(execution_context)) {
489 provider_ = client->Provider(); 489 provider_ = client->Provider();
490 if (provider_) 490 if (provider_)
491 provider_->SetClient(this); 491 provider_->SetClient(this);
492 } 492 }
493 } 493 }
494 494
495 } // namespace blink 495 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698