Title: [260251] trunk/Source/WebKit
Revision
260251
Author
[email protected]
Date
2020-04-17 08:02:22 -0700 (Fri, 17 Apr 2020)

Log Message

REGRESSION (r256756): -[WKUserDefaults initWithSuiteName:]: Instance variable used while 'self' is not set to the result of '[(super or self) init...]'
<https://webkit.org/b/210647>
<rdar://problem/61928289>

Reviewed by Anders Carlsson.

* UIProcess/Cocoa/PreferenceObserver.mm:
(-[WKUserDefaults initWithSuiteName:]):
- Call `[self initWithSuite:]` and set `self` to fix the clang
  static analyzer warning.
- Fix camelCase of `suitename` parameter.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (260250 => 260251)


--- trunk/Source/WebKit/ChangeLog	2020-04-17 14:57:15 UTC (rev 260250)
+++ trunk/Source/WebKit/ChangeLog	2020-04-17 15:02:22 UTC (rev 260251)
@@ -1,3 +1,17 @@
+2020-04-17  David Kilzer  <[email protected]>
+
+        REGRESSION (r256756): -[WKUserDefaults initWithSuiteName:]: Instance variable used while 'self' is not set to the result of '[(super or self) init...]'
+        <https://webkit.org/b/210647>
+        <rdar://problem/61928289>
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/Cocoa/PreferenceObserver.mm:
+        (-[WKUserDefaults initWithSuiteName:]):
+        - Call `[self initWithSuite:]` and set `self` to fix the clang
+          static analyzer warning.
+        - Fix camelCase of `suitename` parameter.
+
 2020-04-17  Per Arne Vollan  <[email protected]>
 
         [iOS] Deny iokit open access to graphics related classes

Modified: trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm (260250 => 260251)


--- trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-04-17 14:57:15 UTC (rev 260250)
+++ trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-04-17 15:02:22 UTC (rev 260251)
@@ -62,11 +62,14 @@
 {
 }
 
-- (instancetype)initWithSuiteName:(NSString *)suitename
+- (instancetype)initWithSuiteName:(NSString *)suiteName
 {
-    m_suiteName = suitename;
+    if (!(self = [super initWithSuiteName:suiteName]))
+        return nil;
+
+    m_suiteName = suiteName;
     m_observer = nil;
-    return [super initWithSuiteName:suitename];
+    return self;
 }
 @end
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to