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

Issue 11026050: Fix crash when using Instant. (Closed)

Created:
8 years, 2 months ago by sreeram
Modified:
8 years, 2 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fix crash when using Instant. Steps to reproduce (on Mac OS, with Chrome Instant enabled): 1. On the NTP, type a partial query (without hitting Enter). 2. After the results preview appears, hit Alt-Enter to open it in a new foreground tab. 3. Without doing anything else, close the tab. The previous NTP tab is now the active tab again. 4. Type another partial query. --> Previously, this would crash. This CL fixes the crash. The root cause is that, after step 2, previewContents_ still referred to the now committed tab. So, when that tab disappears in step 3, previewContents_ is left dangling, causing the crash in step 4. The bug was caused by my earlier CL (http://crrev.com/158613), which removed the HideInstant() call that we made after every Instant commit. HideInstant() nulls out previewContents_, which is why this crash surfaced after that call was removed. Instead of just putting back HideInstant(), I think the right thing to do is to adjust previewContents_, in much the same way that MakePreviewContentsActiveContents() does in the views UI code. BUG=153902 R=sky@chromium.org TEST=See steps above. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=160433

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -0 lines) Patch
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_controller.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
sreeram
Please review.
8 years, 2 months ago (2012-10-04 21:11:13 UTC) #1
sky
I'm not a good reviewer for cocoa. Maybe Avi.
8 years, 2 months ago (2012-10-04 21:49:53 UTC) #2
Avi (use Gerrit)
The cocoa code lg but I don't know much about instant. Who wrote the Mac ...
8 years, 2 months ago (2012-10-04 21:54:44 UTC) #3
sreeram
+rohitrao, please review.
8 years, 2 months ago (2012-10-04 22:35:05 UTC) #4
rohitrao (ping after 24h)
How does the views code handle this case, since "new foreground tab" doesn't go through ...
8 years, 2 months ago (2012-10-04 22:47:26 UTC) #5
rohitrao (ping after 24h)
LGTM for the crash fix. Would like us to dig into this more to find ...
8 years, 2 months ago (2012-10-04 22:50:04 UTC) #6
sreeram
On 2012/10/04 22:50:04, rohitrao wrote: > LGTM for the crash fix. Thanks. @avi, can I ...
8 years, 2 months ago (2012-10-04 22:53:45 UTC) #7
sreeram
On 2012/10/04 22:47:26, rohitrao wrote: > How does the views code handle this case, since ...
8 years, 2 months ago (2012-10-04 23:26:59 UTC) #8
Avi (use Gerrit)
owner lgtm stamp
8 years, 2 months ago (2012-10-05 00:44:50 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sreeram@chromium.org/11026050/1
8 years, 2 months ago (2012-10-05 01:01:07 UTC) #10
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 2 months ago (2012-10-05 01:30:05 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sreeram@chromium.org/11026050/1
8 years, 2 months ago (2012-10-05 16:45:02 UTC) #12
commit-bot: I haz the power
8 years, 2 months ago (2012-10-05 18:46:21 UTC) #13
Change committed as 160433

Powered by Google App Engine
This is Rietveld 408576698