Skip to content
Permalink
Browse files
<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:]):

Canonical link: https://commits.webkit.org/75009@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ddkilzer committed Apr 29, 2011
1 parent 46ca433 commit 2b50e24a688bcdf3ee61eabc151fd01aeb356461
@@ -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.
@@ -123,7 +123,8 @@ + (void)initialize

- (id)init
{
if (![super init])
self = [super init];
if (!self)
return nil;

_entriesByURL = [[NSMutableDictionary alloc] init];
@@ -98,7 +98,9 @@ + (void)initializeLookupTable
- (id)initWithHitTestResult:(const HitTestResult&)result
{
[[self class] initializeLookupTable];
[super init];
self = [super init];
if (!self)
return nil;
_result = new HitTestResult(result);
return self;
}
@@ -106,7 +106,9 @@ + (WebIconDatabase *)sharedIconDatabase

- (id)init
{
[super init];
self = [super init];
if (!self)
return nil;
WebCoreThreadViolationCheckRoundOne();

_private = [[WebIconDatabasePrivate alloc] init];
@@ -122,7 +122,9 @@ + (BOOL)isPlugInView:(NSView *)view

- (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));
@@ -34,7 +34,9 @@ @implementation WebPluginRequest

- (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];
@@ -115,7 +115,9 @@ + (void)initialize
- (id)initWithEditCommand:(PassRefPtr<EditCommand>)command
{
ASSERT(command);
[super init];
self = [super init];
if (!self)
return nil;
m_command = command;
return self;
}
@@ -37,7 +37,9 @@ @implementation WebJavaScriptTextInputPanel

- (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
@@ -57,6 +57,9 @@ @implementation WebNavigationData

- (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];

0 comments on commit 2b50e24

Please sign in to comment.