Comment #1 on issue 5789 by [email protected]: Interstitial related  
unit tests in WebContentsTest should be reenabled
http://code.google.com/p/chromium/issues/detail?id=5789

The following revision refers to this bug:
     http://src.chromium.org/viewvc/chrome?view=rev&revision=7384

------------------------------------------------------------------------
r7384 | [email protected] | 2008-12-22 14:24:14 -0800 (Mon, 22 Dec 2008)  
| 14 lines
Changed paths:
    M  
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/web_contents_unittest.cc?r1=7384&r2=7383

My Friday fix for some stack trashing introduced some heap trashing!
The tests create PageInterstitial objects which are self-owned (they delete  
themselves when hidden).
The tests test whether the PageInterstitial instance has been deleted by  
passing a local variable boolean to its constructor that the  
InterstitialPage sets to true when deleted.

In the stack trashing case, in one of the test the interstitial was deleted  
from the TearDown() method, so outside of the scope of the test. The  
interstitial was still accessing the local variable from the test scope,  
trashing the stack.
My previous fix introduced a state guard class allocated on the stack that  
would notify the InterstitialPage when deleted so it would clear any  
reference to the local vars, which fixed the stack trashing.
But this created a new problem: when the interstitial is deleted in the  
scope of the unit tests, the state guard object still holds a reference to  
the now deleted interstitial and calls a method on it when itself deleted.

This CL ensures the state guard class does not access any deleted  
interstitial.

BUG=5789


Review URL: http://codereview.chromium.org/16423
------------------------------------------------------------------------


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/chromium-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to