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

Issue 10829284: Remove observer when removing delegate, in Instant. (Closed)

Created:
8 years, 4 months ago by sreeram
Modified:
8 years, 4 months ago
Reviewers:
dominich, sky, Shishir, dhollowa
CC:
chromium-reviews, sreeram, gideonwald, dominich, David Black, Jered, Shishir
Visibility:
Public.

Description

Remove observer when removing delegate, in Instant. I believe the crash (see bug link) is caused because we remove the delegate connection, but we never stop observing the WebContents. I haven't reproduced the crash, but I think this should fix the root cause. I've put in a bandaid as well, which might be redundant, but good for safety. Will remove it once I can confirm the fix works. BUG=141875 R=sky@chromium.org TEST=This type of crash (see bug) should go away. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=151173

Patch Set 1 #

Patch Set 2 : Proper fix, hopefully #

Total comments: 2

Patch Set 3 : Delete the observer #

Total comments: 2

Patch Set 4 : Make delegate call the last thing we do #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -7 lines) Patch
M chrome/browser/instant/instant_loader.cc View 1 2 3 6 chunks +23 lines, -7 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
sreeram
Please review.
8 years, 4 months ago (2012-08-10 19:32:48 UTC) #1
sreeram
@sky seems to be away. David/Shishir, could you review this quickly? I'd like to get ...
8 years, 4 months ago (2012-08-10 22:03:10 UTC) #2
dominich
LGTM I think you could maybe wrap up the SetDelegate(x); x->Observe(); pairs of calls in ...
8 years, 4 months ago (2012-08-10 22:10:24 UTC) #3
Shishir
lgtm http://codereview.chromium.org/10829284/diff/2002/chrome/browser/instant/instant_loader.cc File chrome/browser/instant/instant_loader.cc (right): http://codereview.chromium.org/10829284/diff/2002/chrome/browser/instant/instant_loader.cc#newcode232 chrome/browser/instant/instant_loader.cc:232: if (!loader_->preview_contents() || How will you know what ...
8 years, 4 months ago (2012-08-10 22:11:15 UTC) #4
sreeram
http://codereview.chromium.org/10829284/diff/2002/chrome/browser/instant/instant_loader.cc File chrome/browser/instant/instant_loader.cc (right): http://codereview.chromium.org/10829284/diff/2002/chrome/browser/instant/instant_loader.cc#newcode232 chrome/browser/instant/instant_loader.cc:232: if (!loader_->preview_contents() || On 2012/08/10 22:11:15, Shishir wrote: > ...
8 years, 4 months ago (2012-08-10 22:13:54 UTC) #5
sreeram
PTAL. I followed @sky's excellent advice to just delete the delegate, instead of futzing with ...
8 years, 4 months ago (2012-08-10 22:25:06 UTC) #6
dominich
LGTM much better - did this show up on debug trybots before?
8 years, 4 months ago (2012-08-10 22:28:17 UTC) #7
sreeram
On Fri, Aug 10, 2012 at 3:28 PM, <dominich@chromium.org> wrote: > much better - did ...
8 years, 4 months ago (2012-08-10 22:30:46 UTC) #8
dhollowa
LG
8 years, 4 months ago (2012-08-10 22:32:21 UTC) #9
sky
LGTM http://codereview.chromium.org/10829284/diff/5002/chrome/browser/instant/instant_loader.cc File chrome/browser/instant/instant_loader.cc (right): http://codereview.chromium.org/10829284/diff/5002/chrome/browser/instant/instant_loader.cc#newcode253 chrome/browser/instant/instant_loader.cc:253: // If the page doesn't support the Instant ...
8 years, 4 months ago (2012-08-10 22:35:39 UTC) #10
sreeram
8 years, 4 months ago (2012-08-10 22:38:48 UTC) #11
http://codereview.chromium.org/10829284/diff/5002/chrome/browser/instant/inst...
File chrome/browser/instant/instant_loader.cc (right):

http://codereview.chromium.org/10829284/diff/5002/chrome/browser/instant/inst...
chrome/browser/instant/instant_loader.cc:253: // If the page doesn't support the
Instant API, InstantController schedules
On 2012/08/10 22:35:39, sky wrote:
> Can we move this above 250? Seem dangerous to do things after calling out.

Done.

Powered by Google App Engine
This is Rietveld 408576698