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

Side by Side Diff: content/browser/service_worker/embedded_worker_instance.cc

Issue 2563583002: Revert of ServiceWorker: Change DCHECK to CHECK for debugging process allocation (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/embedded_worker_instance.h" 5 #include "content/browser/service_worker/embedded_worker_instance.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 status_(EmbeddedWorkerStatus::STOPPED), 570 status_(EmbeddedWorkerStatus::STOPPED),
571 starting_phase_(NOT_STARTING), 571 starting_phase_(NOT_STARTING),
572 thread_id_(kInvalidEmbeddedWorkerThreadId), 572 thread_id_(kInvalidEmbeddedWorkerThreadId),
573 devtools_attached_(false), 573 devtools_attached_(false),
574 network_accessed_for_script_(false), 574 network_accessed_for_script_(false),
575 weak_factory_(this) {} 575 weak_factory_(this) {}
576 576
577 void EmbeddedWorkerInstance::OnProcessAllocated( 577 void EmbeddedWorkerInstance::OnProcessAllocated(
578 std::unique_ptr<WorkerProcessHandle> handle, 578 std::unique_ptr<WorkerProcessHandle> handle,
579 ServiceWorkerMetrics::StartSituation start_situation) { 579 ServiceWorkerMetrics::StartSituation start_situation) {
580 // TODO(shimazu): Change CHECK to DCHECK after crbug.com/668633 is fixed. 580 DCHECK_EQ(EmbeddedWorkerStatus::STARTING, status_);
581 CHECK_EQ(EmbeddedWorkerStatus::STARTING, status_); 581 DCHECK(!process_handle_);
582 CHECK(!process_handle_);
583 582
584 process_handle_ = std::move(handle); 583 process_handle_ = std::move(handle);
585 starting_phase_ = REGISTERING_TO_DEVTOOLS; 584 starting_phase_ = REGISTERING_TO_DEVTOOLS;
586 start_situation_ = start_situation; 585 start_situation_ = start_situation;
587 for (auto& observer : listener_list_) 586 for (auto& observer : listener_list_)
588 observer.OnProcessAllocated(); 587 observer.OnProcessAllocated();
589 } 588 }
590 589
591 void EmbeddedWorkerInstance::OnRegisteredToDevToolsManager( 590 void EmbeddedWorkerInstance::OnRegisteredToDevToolsManager(
592 bool is_new_process, 591 bool is_new_process,
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 case SCRIPT_READ_FINISHED: 942 case SCRIPT_READ_FINISHED:
944 return "Script read finished"; 943 return "Script read finished";
945 case STARTING_PHASE_MAX_VALUE: 944 case STARTING_PHASE_MAX_VALUE:
946 NOTREACHED(); 945 NOTREACHED();
947 } 946 }
948 NOTREACHED() << phase; 947 NOTREACHED() << phase;
949 return std::string(); 948 return std::string();
950 } 949 }
951 950
952 } // namespace content 951 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698