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

Issue 494243002: Removes setting destroyed_flag_ in NotifyError (Closed)

Created:
6 years, 4 months ago by sky
Modified:
6 years, 4 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Visibility:
Public.

Description

Removes setting destroyed_flag_ in NotifyError I'm changing two things to Connector: . Removing setting destroyed_flag in NotifyError. This seems wrong since Connector hasn't been destroyed. If destoyed_flag_ was non-NULL and we set it to true and we're nested, then when the stack unravels destroyed_flag_ won't be unset even though Connector may not have been destroyed. This would leave Connector in a very bad state. . Makes NotifyError cancel a wait. If there was a wait outstanding or a notification was in flight than if we don't cancel the wait we may very well end up back in OnHandleReady trying to do something. BUG=none TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291354

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -5 lines) Patch
M mojo/public/cpp/bindings/lib/connector.cc View 1 chunk +1 line, -5 lines 8 comments Download

Messages

Total messages: 20 (0 generated)
sky
6 years, 4 months ago (2014-08-21 21:21:44 UTC) #1
darin (slow to review)
LGTM https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc File mojo/public/cpp/bindings/lib/connector.cc (left): https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc#oldcode204 mojo/public/cpp/bindings/lib/connector.cc:204: *destroyed_flag_ = true; // Propagate flag. The "Propagate ...
6 years, 4 months ago (2014-08-21 23:47:26 UTC) #2
sky
The CQ bit was checked by sky@chromium.org
6 years, 4 months ago (2014-08-21 23:56:20 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/494243002/1
6 years, 4 months ago (2014-08-21 23:59:32 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-22 00:55:49 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-22 01:00:47 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/8296)
6 years, 4 months ago (2014-08-22 01:00:48 UTC) #7
sky
The CQ bit was checked by sky@chromium.org
6 years, 4 months ago (2014-08-22 02:35:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/494243002/1
6 years, 4 months ago (2014-08-22 02:36:17 UTC) #9
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-22 02:39:10 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (1) as 291354
6 years, 4 months ago (2014-08-22 07:33:51 UTC) #11
qsr
Do you have an example where there is a problem with the code as it ...
6 years, 4 months ago (2014-08-22 08:28:53 UTC) #12
qsr
https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc File mojo/public/cpp/bindings/lib/connector.cc (right): https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc#newcode201 mojo/public/cpp/bindings/lib/connector.cc:201: CancelWait(); What is the code path where we can ...
6 years, 4 months ago (2014-08-22 08:28:59 UTC) #13
sky
I think I've addressed your earlier comment qsr. Let me know if I'm missing something. ...
6 years, 4 months ago (2014-08-22 15:06:00 UTC) #14
qsr
https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc File mojo/public/cpp/bindings/lib/connector.cc (right): https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc#newcode203 mojo/public/cpp/bindings/lib/connector.cc:203: error_handler_->OnConnectionError(); On 2014/08/22 15:06:00, sky wrote: > On 2014/08/22 ...
6 years, 4 months ago (2014-08-22 15:21:25 UTC) #15
viettrungluu
https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc File mojo/public/cpp/bindings/lib/connector.cc (right): https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc#newcode201 mojo/public/cpp/bindings/lib/connector.cc:201: CancelWait(); On 2014/08/22 15:06:00, sky wrote: > On 2014/08/22 ...
6 years, 4 months ago (2014-08-22 15:30:57 UTC) #16
sky
On 2014/08/22 15:30:57, viettrungluu wrote: > https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc > File mojo/public/cpp/bindings/lib/connector.cc (right): > > https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib/connector.cc#newcode201 > ...
6 years, 4 months ago (2014-08-22 15:36:50 UTC) #17
viettrungluu
On Fri, Aug 22, 2014 at 8:36 AM, <sky@chromium.org> wrote: > On 2014/08/22 15:30:57, viettrungluu ...
6 years, 4 months ago (2014-08-22 15:53:09 UTC) #18
sky
On Fri, Aug 22, 2014 at 8:53 AM, Viet-Trung Luu <viettrungluu@chromium.org> wrote: > On Fri, ...
6 years, 4 months ago (2014-08-22 15:55:57 UTC) #19
darin (slow to review)
6 years, 4 months ago (2014-08-22 16:11:27 UTC) #20
Message was sent while issue was closed.
public/cpp/bindings/tests/connector_unittest.cc could probably be adapted to
test the case of WaitForIncomingMessage triggering OnConnectionError.

https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib...
File mojo/public/cpp/bindings/lib/connector.cc (right):

https://codereview.chromium.org/494243002/diff/1/mojo/public/cpp/bindings/lib...
mojo/public/cpp/bindings/lib/connector.cc:201: CancelWait();
On 2014/08/22 15:06:00, sky wrote:
> On 2014/08/22 08:28:59, qsr wrote:
> > What is the code path where we can be waiting? From what I can see, we are
> never
> > in the waiting state when calling this method.
> 
> WaitForIncomingMessage is public and can be invoked by anyone.
> WaitForIncomingMessage does not attempt to cancel the AsycWait request. If
there
> is an outstanding wait and we get here it means we'll notify of the connection
> error and then get a callback on OnHandleReady and potentially end up right
back
> in here.

Would probably be good to add a comment explaining this.

Powered by Google App Engine
This is Rietveld 408576698