⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287986 in webkit


Ignore:
Timestamp:
Jan 13, 2022, 12:22:50 PM (5 years ago)
Author:
timothy_horton@apple.com
Message:

Fix a few Objective-C object leaks due to early returns in init
​https://bugs.webkit.org/show_bug.cgi?id=235162
<rdar://problem/87489048>

Reviewed by Wenson Hsieh.

Source/JavaScriptCore:

  • API/JSValue.mm:

(-[JSValue initWithValue:inContext:]):

Source/WebCore:

  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController init]):

Source/WebKit:

  • UIProcess/ios/WKHoverPlatter.mm:

(-[WKHoverPlatter initWithView:delegate:]):

Source/WebKitLegacy/mac:

  • Storage/WebDatabaseQuotaManager.mm:

(WebCore::if):

Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSValue.mm

    r277920 r287986  
    11091109- (JSValue *)initWithValue:(JSValueRef)value inContext:(JSContext *)context
    11101110{
    1111     if (!value || !context)
     1111    if (!value || !context) {
     1112        [self release];
    11121113        return nil;
     1114    }
    11131115
    11141116    self = [super init];
  • trunk/Source/JavaScriptCore/ChangeLog

    r287961 r287986  
     12022-01-13  Tim Horton  <timothy_horton@apple.com>
     2
     3        Fix a few Objective-C object leaks due to early returns in `init`
     4        https://bugs.webkit.org/show_bug.cgi?id=235162
     5        <rdar://problem/87489048>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * API/JSValue.mm:
     10        (-[JSValue initWithValue:inContext:]):
     11
    1122022-01-12  Mark Lam  <mark.lam@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r287984 r287986  
     12022-01-13  Tim Horton  <timothy_horton@apple.com>
     2
     3        Fix a few Objective-C object leaks due to early returns in `init`
     4        https://bugs.webkit.org/show_bug.cgi?id=235162
     5        <rdar://problem/87489048>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * platform/ios/WebAVPlayerController.mm:
     10        (-[WebAVPlayerController init]):
     11
    1122022-01-13  Alejandro G. Castro  <alex@igalia.com>
    213
  • trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm

    r284743 r287986  
    6767- (instancetype)init
    6868{
    69     if (!getAVPlayerControllerClass())
     69    if (!getAVPlayerControllerClass()) {
     70        [self release];
    7071        return nil;
     72    }
    7173
    7274    if (!(self = [super init]))
  • trunk/Source/WebKit/ChangeLog

    r287979 r287986  
     12022-01-13  Tim Horton  <timothy_horton@apple.com>
     2
     3        Fix a few Objective-C object leaks due to early returns in `init`
     4        https://bugs.webkit.org/show_bug.cgi?id=235162
     5        <rdar://problem/87489048>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * UIProcess/ios/WKHoverPlatter.mm:
     10        (-[WKHoverPlatter initWithView:delegate:]):
     11
    1122022-01-13  Patrick Angle  <pangle@apple.com>
    213
  • trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.mm

    r284453 r287986  
    9494{
    9595    auto parameters = WKHoverPlatterDomain.rootSettings;
    96     if (!parameters.platterEnabledForMouse && !parameters.platterEnabledForHover)
     96    if (!parameters.platterEnabledForMouse && !parameters.platterEnabledForHover) {
     97        [self release];
    9798        return nil;
     99    }
    98100
    99101    self = [super init];
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r287951 r287986  
     12022-01-13  Tim Horton  <timothy_horton@apple.com>
     2
     3        Fix a few Objective-C object leaks due to early returns in `init`
     4        https://bugs.webkit.org/show_bug.cgi?id=235162
     5        <rdar://problem/87489048>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * Storage/WebDatabaseQuotaManager.mm:
     10        (WebCore::if):
     11
    1122022-01-12  Matt Woodrow  <mattwoodrow@apple.com>
    213
  • trunk/Source/WebKitLegacy/mac/Storage/WebDatabaseQuotaManager.mm

    r229979 r287986  
    3636- (id)initWithOrigin:(WebSecurityOrigin *)origin
    3737{
    38     if (!origin)
     38    if (!origin) {
     39        [self release];
    3940        return nil;
     41    }
    4042
    4143    self = [super init];
Note: See TracChangeset for help on using the changeset viewer.