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

Unified Diff: content/browser/service_worker/embedded_worker_instance.cc

Issue 2703153002: ServiceWorker: ignore AddMessageToConsole before process allocation (Closed)
Patch Set: Use process_id() instead of switch statement Created 3 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/browser/service_worker/embedded_worker_instance_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/embedded_worker_instance.cc
diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
index 4aed03ff82a51cd65a2e7578bda5e9b24fe9a98b..d9db0fdbca3b2949de49b6786b8661b3dc041e66 100644
--- a/content/browser/service_worker/embedded_worker_instance.cc
+++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -871,10 +871,8 @@ base::TimeDelta EmbeddedWorkerInstance::UpdateStepTime() {
void EmbeddedWorkerInstance::AddMessageToConsole(
blink::WebConsoleMessage::Level level,
const std::string& message) {
- if (status_ != EmbeddedWorkerStatus::RUNNING &&
- status_ != EmbeddedWorkerStatus::STARTING) {
+ if (process_id() == ChildProcessHost::kInvalidUniqueID)
return;
- }
DCHECK(client_.is_bound());
client_->AddMessageToConsole(level, message);
}
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_instance_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698