Changeset 159322 in webkit


Ignore:
Timestamp:
Nov 14, 2013, 4:28:38 PM (12 years ago)
Author:
mitz@apple.com
Message:

[Cocoa] WKBrowsingContextController's policy client implementation over-releases WKURLRequests and WKURLResponses
https://bugs.webkit.org/show_bug.cgi?id=124386

Reviewed by Sam Weinig.

  • UIProcess/API/mac/WKBrowsingContextController.mm:

(setUpPagePolicyClient): Changed to release the Cocoa objects we copy out of the WK objects
passed into the client callbacks, but not the WK objects themselves, which are not owned by
the callbacks.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r159319 r159322  
     12013-11-14  Dan Bernstein  <mitz@apple.com>
     2
     3        [Cocoa] WKBrowsingContextController's policy client implementation over-releases WKURLRequests and WKURLResponses
     4        https://bugs.webkit.org/show_bug.cgi?id=124386
     5
     6        Reviewed by Sam Weinig.
     7
     8        * UIProcess/API/mac/WKBrowsingContextController.mm:
     9        (setUpPagePolicyClient): Changed to release the Cocoa objects we copy out of the WK objects
     10        passed into the client callbacks, but not the WK objects themselves, which are not owned by
     11        the callbacks.
     12
    1132013-11-14  Andy Estes  <aestes@apple.com>
    214
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm

    r159309 r159322  
    632632                WKActionModifierFlagsKey: @(modifiers),
    633633                WKActionMouseButtonKey: @(mouseButton),
    634                 WKActionURLRequestKey: autoreleased(request)
     634                WKActionURLRequestKey: adoptNS(WKURLRequestCopyNSURLRequest(request)).get()
    635635            };
    636636           
     
    649649                WKActionModifierFlagsKey: @(modifiers),
    650650                WKActionMouseButtonKey: @(mouseButton),
    651                 WKActionURLRequestKey: autoreleased(request),
     651                WKActionURLRequestKey: adoptNS(WKURLRequestCopyNSURLRequest(request)).get(),
    652652                WKActionFrameNameKey: toImpl(frameName)->wrapper()
    653653            };
     
    664664            NSDictionary *actionDictionary = @{
    665665                WKActionIsMainFrameKey: @(WKFrameIsMainFrame(frame)),
    666                 WKActionURLRequestKey: autoreleased(request),
    667                 WKActionURLResponseKey: autoreleased(response)
     666                WKActionURLRequestKey: adoptNS(WKURLRequestCopyNSURLRequest(request)).get(),
     667                WKActionURLResponseKey: adoptNS(WKURLResponseCopyNSURLResponse(response)).get()
    668668            };
    669669
Note: See TracChangeset for help on using the changeset viewer.