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

Issue 10919259: Fix MessageReader not to invoke message callback from done callback. (Closed)

Created:
8 years, 3 months ago by Sergey Ulanov
Modified:
8 years, 3 months ago
Reviewers:
Wez
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, simonmorris+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, rmsousa+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Fix MessageReader not to invoke message callback from done callback. In the current implementation MessageReader may read a message while processing done callback for the previous message. The message handler may not expect that which may lead to crashes. E.g. ChannelMultiplex was written such that OnPacketReceived() is not reentrant. BUG=148512 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=156490

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -20 lines) Patch
M remoting/protocol/message_reader.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M remoting/protocol/message_reader.cc View 1 2 3 chunks +14 lines, -13 lines 0 comments Download
M remoting/protocol/message_reader_unittest.cc View 1 2 13 chunks +63 lines, -7 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Sergey Ulanov
8 years, 3 months ago (2012-09-13 00:44:11 UTC) #1
Wez
http://codereview.chromium.org/10919259/diff/5/remoting/protocol/message_reader.cc File remoting/protocol/message_reader.cc (right): http://codereview.chromium.org/10919259/diff/5/remoting/protocol/message_reader.cc#newcode129 remoting/protocol/message_reader.cc:129: if (!read_pending_) nit: DoRead() already checks |read_pending_| so you ...
8 years, 3 months ago (2012-09-13 01:00:09 UTC) #2
Sergey Ulanov
http://codereview.chromium.org/10919259/diff/5/remoting/protocol/message_reader.cc File remoting/protocol/message_reader.cc (right): http://codereview.chromium.org/10919259/diff/5/remoting/protocol/message_reader.cc#newcode129 remoting/protocol/message_reader.cc:129: if (!read_pending_) On 2012/09/13 01:00:09, Wez wrote: > nit: ...
8 years, 3 months ago (2012-09-13 01:40:21 UTC) #3
Wez
lgtm
8 years, 3 months ago (2012-09-13 01:41:51 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sergeyu@chromium.org/10919259/5002
8 years, 3 months ago (2012-09-13 01:57:41 UTC) #5
commit-bot: I haz the power
8 years, 3 months ago (2012-09-13 03:44:40 UTC) #6
Change committed as 156490

Powered by Google App Engine
This is Rietveld 408576698