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

Issue 489303002: Use DCHECK instead of LOG(ERROR) in embedded_worker_registry.cc (Closed)

Created:
6 years, 4 months ago by horo
Modified:
6 years, 1 month ago
Reviewers:
falken, nhiroki
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, nasko, vsevik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Use DCHECK instead of LOG(ERROR) in embedded_worker_registry.cc LOG statements pollute output. BUG=N/A Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291038

Patch Set 1 #

Total comments: 2

Patch Set 2 : use DCHECK_EQ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -51 lines) Patch
M content/browser/service_worker/embedded_worker_registry.cc View 1 7 chunks +24 lines, -51 lines 1 comment Download

Messages

Total messages: 10 (1 generated)
horo
nhiroki@ Could you please review?
6 years, 4 months ago (2014-08-21 01:48:37 UTC) #1
nhiroki
LGTM with nits. CL title: "\" -> "/" https://codereview.chromium.org/489303002/diff/1/content/browser/service_worker/embedded_worker_registry.cc File content/browser/service_worker/embedded_worker_registry.cc (right): https://codereview.chromium.org/489303002/diff/1/content/browser/service_worker/embedded_worker_registry.cc#newcode75 content/browser/service_worker/embedded_worker_registry.cc:75: DCHECK(found->second->process_id() ...
6 years, 4 months ago (2014-08-21 02:13:18 UTC) #2
horo
Done. https://codereview.chromium.org/489303002/diff/1/content/browser/service_worker/embedded_worker_registry.cc File content/browser/service_worker/embedded_worker_registry.cc (right): https://codereview.chromium.org/489303002/diff/1/content/browser/service_worker/embedded_worker_registry.cc#newcode75 content/browser/service_worker/embedded_worker_registry.cc:75: DCHECK(found->second->process_id() == process_id); On 2014/08/21 02:13:18, nhiroki wrote: ...
6 years, 4 months ago (2014-08-21 03:56:39 UTC) #3
horo
The CQ bit was checked by horo@chromium.org
6 years, 4 months ago (2014-08-21 03:56:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/horo@chromium.org/489303002/20001
6 years, 4 months ago (2014-08-21 03:57:51 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (20001) as 291038
6 years, 4 months ago (2014-08-21 10:43:29 UTC) #6
falken
https://codereview.chromium.org/489303002/diff/20001/content/browser/service_worker/embedded_worker_registry.cc File content/browser/service_worker/embedded_worker_registry.cc (right): https://codereview.chromium.org/489303002/diff/20001/content/browser/service_worker/embedded_worker_registry.cc#newcode57 content/browser/service_worker/embedded_worker_registry.cc:57: if (found == worker_map_.end()) Typically we should not have ...
6 years, 1 month ago (2014-11-06 02:07:54 UTC) #8
falken
On 2014/11/06 02:07:54, falken wrote: > https://codereview.chromium.org/489303002/diff/20001/content/browser/service_worker/embedded_worker_registry.cc > File content/browser/service_worker/embedded_worker_registry.cc (right): > > https://codereview.chromium.org/489303002/diff/20001/content/browser/service_worker/embedded_worker_registry.cc#newcode57 > ...
6 years, 1 month ago (2014-11-06 02:18:10 UTC) #9
horo
6 years, 1 month ago (2014-11-06 06:23:15 UTC) #10
Message was sent while issue was closed.
On 2014/11/06 02:18:10, falken wrote:
> On 2014/11/06 02:07:54, falken wrote:
> >
>
https://codereview.chromium.org/489303002/diff/20001/content/browser/service_...
> > File content/browser/service_worker/embedded_worker_registry.cc (right):
> > 
> >
>
https://codereview.chromium.org/489303002/diff/20001/content/browser/service_...
> > content/browser/service_worker/embedded_worker_registry.cc:57: if (found ==
> > worker_map_.end())
> > Typically we should not have constructions of the form[1]:
> > 
> > DCHECK(foo);
> > if (!foo) { ... }
> > 
> > [1]
> >
>
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/c2X0D1Z6X2o/ddkFL...
> > 
> > I would like to remove this handling of an impossible condition. However,
this
> > change seemed motivated by log output spam, which would mean these are not
> > impossible conditions. That's a bug we better fix.
> > 
> > Do you remember what motivated this change? Do we see these DCHECKs
occurring
> > still?
> 
> Actually since this input comes from the renderer, I think we should terminate
> the renderer if it violates our assumptions rather than a DCHECK.

Yes. This message is from the renderer. So we should terminate the invalid
renderer.

Powered by Google App Engine
This is Rietveld 408576698