[webkit-changes] cvs commit: WebKit/WebView.subproj WebDataSource.m

Geoffrey ggaren at opensource.apple.com
Fri Oct 21 18:42:04 PDT 2005


ggaren      05/10/21 18:42:04

  Modified:    .        ChangeLog
               WebView.subproj WebDataSource.m
  Log:
          Reviewed by darin.
  
          WebKit side of the fix for <rdar://problem/4184719> window.print() followed by
          window.close() causes world leak
  
          No test case added because I have another reviewed patch that will include a test
          for this bug as well as many others.
  
          Under some conditions, [WebDataSource stopLoading] did not set [WebDataSource isLoading]
          to false, so the didFInishLoad delegates never fired.
  
          The reason isLoading didn't become false was that the tokenizer was still running.
          The fix here is to move the call to [WebCoreBridge stopLoading] above the early return
          inside [WebDataSource stopLoading] -- since the tokenizer may still be running even if the
          loader is finished loading -- and then to call [WebFrame _checkLoadComplete] to
          give the frame a chance to fire its delegates.
  
          * WebView.subproj/WebDataSource.m:
          (-[WebDataSource _stopLoadingInternal]):
  
  Revision  Changes    Path
  1.3358    +22 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3357
  retrieving revision 1.3358
  diff -u -r1.3357 -r1.3358
  --- ChangeLog	22 Oct 2005 00:11:16 -0000	1.3357
  +++ ChangeLog	22 Oct 2005 01:42:01 -0000	1.3358
  @@ -1,3 +1,25 @@
  +2005-10-21  Geoffrey Garen  <ggaren at apple.com>
  +
  +        Reviewed by darin.
  +        
  +        WebKit side of the fix for <rdar://problem/4184719> window.print() followed by 
  +        window.close() causes world leak
  +        
  +        No test case added because I have another reviewed patch that will include a test
  +        for this bug as well as many others.
  +
  +        Under some conditions, [WebDataSource stopLoading] did not set [WebDataSource isLoading]
  +        to false, so the didFInishLoad delegates never fired.
  +        
  +        The reason isLoading didn't become false was that the tokenizer was still running.
  +        The fix here is to move the call to [WebCoreBridge stopLoading] above the early return
  +        inside [WebDataSource stopLoading] -- since the tokenizer may still be running even if the
  +        loader is finished loading -- and then to call [WebFrame _checkLoadComplete] to 
  +        give the frame a chance to fire its delegates.
  +        
  +        * WebView.subproj/WebDataSource.m:
  +        (-[WebDataSource _stopLoadingInternal]):
  +
   2005-10-21  Beth Dakin  <bdakin at apple.com>
   
           Reviewed by Darin??
  
  
  
  1.214     +9 -4      WebKit/WebView.subproj/WebDataSource.m
  
  Index: WebDataSource.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebDataSource.m,v
  retrieving revision 1.213
  retrieving revision 1.214
  diff -u -r1.213 -r1.214
  --- WebDataSource.m	22 Oct 2005 00:11:19 -0000	1.213
  +++ WebDataSource.m	22 Oct 2005 01:42:04 -0000	1.214
  @@ -451,6 +451,15 @@
       // is done loading and not stopping it can cause a world leak.
       [_private->iconLoader stopLoading];
   
  +    // The same goes for the bridge/part, which may still be parsing.
  +    if (_private->committed) {
  +        [[self _bridge] stopLoading];
  +      
  +        // If the data source was done loading, but the tokenizer was still running, the frame
  +        // didn't have a chance to fire its didFinish delegates, so we give it a chance here.
  +        [[self webFrame] _checkLoadComplete];
  +    }
  +
       if (!_private->loading) {
   	return;
       }
  @@ -471,10 +480,6 @@
       NSArray *loaders = [_private->subresourceLoaders copy];
       [loaders makeObjectsPerformSelector:@selector(cancel)];
       [loaders release];
  -    
  -    if (_private->committed) {
  -	[[self _bridge] stopLoading];        
  -    }
   }
   
   - (void)_recursiveStopLoading
  
  
  



More information about the webkit-changes mailing list