<http://webkit.org/b/59758> Fix static analyzer warnings for missing assignment to...
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2011 04:57:32 +0000 (04:57 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2011 04:57:32 +0000 (04:57 +0000)
Reviewed by Anders Carlsson.

* History/WebHistory.mm:
(-[WebHistoryPrivate init]):
* Misc/WebElementDictionary.mm:
(-[WebElementDictionary initWithHitTestResult:]):
* Misc/WebIconDatabase.mm:
(-[WebIconDatabase init]):
* Plugins/WebPluginController.mm:
(-[WebPluginController initWithDocumentView:]):
* Plugins/WebPluginRequest.m:
(-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
* WebCoreSupport/WebEditorClient.mm:
(-[WebEditCommand initWithEditCommand:]):
* WebCoreSupport/WebJavaScriptTextInputPanel.m:
(-[WebJavaScriptTextInputPanel initWithPrompt:text:]):
* WebView/WebNavigationData.mm:
(-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85302 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/History/WebHistory.mm
Source/WebKit/mac/Misc/WebElementDictionary.mm
Source/WebKit/mac/Misc/WebIconDatabase.mm
Source/WebKit/mac/Plugins/WebPluginController.mm
Source/WebKit/mac/Plugins/WebPluginRequest.m
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/mac/WebCoreSupport/WebJavaScriptTextInputPanel.m
Source/WebKit/mac/WebView/WebNavigationData.mm

index 0a164b5b4020dbcc6db970bd845005fb4fb1ef1c..84ad62e506628b704185409c6c292b9ad96b1c7d 100644 (file)
@@ -1,3 +1,26 @@
+2011-04-28  David Kilzer  <ddkilzer@apple.com>
+
+        <http://webkit.org/b/59758> Fix static analyzer warnings for missing assignment to 'self' in -init methods
+
+        Reviewed by Anders Carlsson.
+
+        * History/WebHistory.mm:
+        (-[WebHistoryPrivate init]):
+        * Misc/WebElementDictionary.mm:
+        (-[WebElementDictionary initWithHitTestResult:]):
+        * Misc/WebIconDatabase.mm:
+        (-[WebIconDatabase init]):
+        * Plugins/WebPluginController.mm:
+        (-[WebPluginController initWithDocumentView:]):
+        * Plugins/WebPluginRequest.m:
+        (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
+        * WebCoreSupport/WebEditorClient.mm:
+        (-[WebEditCommand initWithEditCommand:]):
+        * WebCoreSupport/WebJavaScriptTextInputPanel.m:
+        (-[WebJavaScriptTextInputPanel initWithPrompt:text:]):
+        * WebView/WebNavigationData.mm:
+        (-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]):
+
 2011-04-28  David Levin  <levin@chromium.org>
 
         Reviewed by Adam Barth.
index 00cee7859788805e241335a6891cdde26f955a8d..6e3ebce1c5bfca8960f4a4eb88659619c718f8af 100644 (file)
@@ -123,7 +123,8 @@ private:
 
 - (id)init
 {
-    if (![super init])
+    self = [super init];
+    if (!self)
         return nil;
     
     _entriesByURL = [[NSMutableDictionary alloc] init];
index b01ae4c4b62ffdfba0671d8cfc093202aad49bf6..5bdae4b9cc47d5b88448c01a5df8d54baf5f5d79 100644 (file)
@@ -98,7 +98,9 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
 - (id)initWithHitTestResult:(const HitTestResult&)result
 {
     [[self class] initializeLookupTable];
-    [super init];
+    self = [super init];
+    if (!self)
+        return nil;
     _result = new HitTestResult(result);
     return self;
 }
index e9aa8ecb0d3f3320366ed17a0698c54a3d4e02c4..e97ebc2be328d4ec7f28d0b8abf24f9a6d238ec5 100644 (file)
@@ -106,7 +106,9 @@ static WebIconDatabaseClient* defaultClient()
 
 - (id)init
 {
-    [super init];
+    self = [super init];
+    if (!self)
+        return nil;
     WebCoreThreadViolationCheckRoundOne();
         
     _private = [[WebIconDatabasePrivate alloc] init];
index c802d4ce09a7a705f2c14d5eff3fbfd84dd4b831..65a05ae401ee574e376be56f5b2e158d755825da 100644 (file)
@@ -122,7 +122,9 @@ static NSMutableSet *pluginViews = nil;
 
 - (id)initWithDocumentView:(NSView *)view
 {
-    [super init];
+    self = [super init];
+    if (!self)
+        return nil;
     _documentView = view;
     _views = [[NSMutableArray alloc] init];
     _checksInProgress = (NSMutableSet *)CFMakeCollectable(CFSetCreateMutable(NULL, 0, NULL));
index df36d401ba6193e9d66eca2a5ad59c34a6e75113..7ca34076e2f401d803d5ec8bfb800874de90fd1c 100644 (file)
@@ -34,7 +34,9 @@
 
 - (id)initWithRequest:(NSURLRequest *)request frameName:(NSString *)frameName notifyData:(void *)notifyData sendNotification:(BOOL)sendNotification didStartFromUserGesture:(BOOL)currentEventIsUserGesture
 {
-    [super init];
+    self = [super init];
+    if (!self)
+        return nil;
     _didStartFromUserGesture = currentEventIsUserGesture;
     _request = [request retain];
     _frameName = [frameName retain];
index fe070dfa0332b179ce43c674c88f3c2839aab3b5..a0cf3abc407206005582107f4a7a88c0c46e485f 100644 (file)
@@ -115,7 +115,9 @@ static const int InvalidCorrectionPanelTag = 0;
 - (id)initWithEditCommand:(PassRefPtr<EditCommand>)command
 {
     ASSERT(command);
-    [super init];
+    self = [super init];
+    if (!self)
+        return nil;
     m_command = command;
     return self;
 }
index bd1a60155bf37e0600188ab4db29ae153721523a..4728a6e5262c9168a371cfadb91a7b2d327f629b 100644 (file)
@@ -37,7 +37,9 @@
 
 - (id)initWithPrompt:(NSString *)p text:(NSString *)t
 {
-    [self initWithWindowNibName:@"WebJavaScriptTextInputPanel"];
+    self = [self initWithWindowNibName:@"WebJavaScriptTextInputPanel"];
+    if (!self)
+        return nil;
     NSWindow *window = [self window];
     
     // This must be done after the call to [self window], because
index 753a441306d8d5153a5d7f9ff26160ceff9dea45..06e4a6030168aac245640017d3986978e23f127a 100644 (file)
@@ -57,6 +57,9 @@
 
 - (id)initWithURLString:(NSString *)url title:(NSString *)title originalRequest:(NSURLRequest *)request response:(NSURLResponse *)response hasSubstituteData:(BOOL)hasSubstituteData clientRedirectSource:(NSString *)redirectSource
 {
+    self = [super init];
+    if (!self)
+        return nil;
     _private = [[WebNavigationDataPrivate alloc] init];
     
     _private->url = [url retain];