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

Changeset 284896 in webkit


Ignore:
Timestamp:
Oct 26, 2021, 2:13:02 PM (5 years ago)
Author:
Brent Fulgham
Message:

[AppSSO] Avoid attempting to display a nil view controller
https://bugs.webkit.org/show_bug.cgi?id=232311
<rdar://problem/55199117>

Reviewed by Kate Cheney.

Avoid attempting to present a nil NSViewController. Instead, just treat the interaction as if
the authentication was cancelled.

  • UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm:

(-[WKSOAuthorizationDelegate authorization:presentViewController:withCompletion:]):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r284889 r284896  
     12021-10-26  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [AppSSO] Avoid attempting to display a nil view controller
     4        https://bugs.webkit.org/show_bug.cgi?id=232311
     5        <rdar://problem/55199117>
     6
     7        Reviewed by Kate Cheney.
     8
     9        Avoid attempting to present a nil NSViewController. Instead, just treat the interaction as if
     10        the authentication was cancelled.
     11
     12        * UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm:
     13        (-[WKSOAuthorizationDelegate authorization:presentViewController:withCompletion:]):
     14
    1152021-10-26  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm

    r279305 r284896  
    4747        return;
    4848    }
     49
     50    if (!viewController) {
     51        WKSOAUTHORIZATIONDELEGATE_RELEASE_LOG("authorization: No view controller to present, so completing with NO as success state.");
     52        completion(NO, nil);
     53        return;
     54    }
     55
    4956    WKSOAUTHORIZATIONDELEGATE_RELEASE_LOG("authorization: presentingViewController %p", viewController);
    5057    _session->presentViewController(viewController, completion);
Note: See TracChangeset for help on using the changeset viewer.