Changeset 19167 in webkit
- Timestamp:
- Jan 26, 2007, 4:52:16 PM (18 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r19135 r19167 1 2007-01-26 Kevin Decker <kdecker@apple.com> 2 3 Reviewed by andersca. 4 5 Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory 6 http://bugs.webkit.org/show_bug.cgi?id=11523 7 8 * Plugins/WebBaseNetscapePluginStream.m: 9 (-[WebBaseNetscapePluginStream setPlugin:]): Calls -[WebBaseNetscapePluginView disconnectStream:] 10 * Plugins/WebBaseNetscapePluginView.h: Added disconnectStream: to header. 11 * Plugins/WebBaseNetscapePluginView.mm: 12 (-[WebBaseNetscapePluginView stop]): Make a copy of the streams collection prior to calling stop all streams. 13 This is necessary because calling stop has the side effect of removing the stream from this same collection. 14 (-[WebBaseNetscapePluginView disconnectStream:]): Added. Removes the stream from the streams collection. 15 1 16 2007-01-25 Kevin Decker <kdecker@apple.com> 2 17 -
trunk/WebKit/Plugins/WebBaseNetscapePluginStream.m
r19135 r19167 175 175 NPP_URLNotify = [pluginPackage NPP_URLNotify]; 176 176 } else { 177 WebBaseNetscapePluginView *view = pluginView; 178 177 179 plugin = NULL; 178 [pluginView release];179 pluginView = nil;180 180 NPP_NewStream = NULL; 181 181 NPP_WriteReady = NULL; … … 184 184 NPP_DestroyStream = NULL; 185 185 NPP_URLNotify = NULL; 186 pluginView = nil; 187 188 [view disconnectStream:self]; 189 [view release]; 186 190 } 187 191 } -
trunk/WebKit/Plugins/WebBaseNetscapePluginView.h
r19135 r19167 152 152 - (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow; 153 153 - (void)viewDidMoveToHostWindow; 154 - (void)disconnectStream:(WebBaseNetscapePluginStream*)stream; 154 155 155 156 // Returns the NPObject that represents the plugin interface. -
trunk/WebKit/Plugins/WebBaseNetscapePluginView.mm
r19135 r19167 1291 1291 1292 1292 isStarted = NO; 1293 1294 // Stop any active streams 1295 [streams makeObjectsPerformSelector:@selector(stop)]; 1296 1293 // To stop active streams it's necessary to invoke makeObjectsPerformSelector on a copy 1294 // of streams. This is because calling -[WebNetscapePluginStream stop] also has the side effect 1295 // of removing a stream from this collection. 1296 NSArray *streamsCopy = [streams copy]; 1297 [streamsCopy makeObjectsPerformSelector:@selector(stop)]; 1298 [streamsCopy release]; 1299 1297 1300 // Stop the null events 1298 1301 [self stopNullEvents]; … … 1495 1498 free(cAttributes); 1496 1499 free(cValues); 1500 } 1501 1502 - (void)disconnectStream:(WebBaseNetscapePluginStream*)stream 1503 { 1504 [streams removeObjectIdenticalTo:stream]; 1497 1505 } 1498 1506
Note:
See TracChangeset
for help on using the changeset viewer.