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

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

Issue 2879773002: Replace remaining ASSERT with DCHECK|DCHECK_FOO in modules (Closed)
Patch Set: Replace remaining ASSERT with DCHECK|DCHECK_FOO in modules 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 class ServiceWorkerContainer::GetRegistrationForReadyCallback 104 class ServiceWorkerContainer::GetRegistrationForReadyCallback
105 : public WebServiceWorkerProvider:: 105 : public WebServiceWorkerProvider::
106 WebServiceWorkerGetRegistrationForReadyCallbacks { 106 WebServiceWorkerGetRegistrationForReadyCallbacks {
107 public: 107 public:
108 explicit GetRegistrationForReadyCallback(ReadyProperty* ready) 108 explicit GetRegistrationForReadyCallback(ReadyProperty* ready)
109 : ready_(ready) {} 109 : ready_(ready) {}
110 ~GetRegistrationForReadyCallback() override {} 110 ~GetRegistrationForReadyCallback() override {}
111 111
112 void OnSuccess( 112 void OnSuccess(
113 std::unique_ptr<WebServiceWorkerRegistration::Handle> handle) override { 113 std::unique_ptr<WebServiceWorkerRegistration::Handle> handle) override {
114 ASSERT(ready_->GetState() == ReadyProperty::kPending); 114 DCHECK_EQ(ready_->GetState(), ReadyProperty::kPending);
115 115
116 if (ready_->GetExecutionContext() && 116 if (ready_->GetExecutionContext() &&
117 !ready_->GetExecutionContext()->IsContextDestroyed()) { 117 !ready_->GetExecutionContext()->IsContextDestroyed()) {
118 ready_->Resolve(ServiceWorkerRegistration::GetOrCreate( 118 ready_->Resolve(ServiceWorkerRegistration::GetOrCreate(
119 ready_->GetExecutionContext(), WTF::WrapUnique(handle.release()))); 119 ready_->GetExecutionContext(), WTF::WrapUnique(handle.release())));
120 } 120 }
121 } 121 }
122 122
123 private: 123 private:
124 Persistent<ReadyProperty> ready_; 124 Persistent<ReadyProperty> ready_;
(...skipping 361 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