[Webkit-unassigned] [Bug 136140] New: Possible RetainPtr misuse in WKScriptMessage.mm - could leak

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 21 17:41:18 PDT 2014


           Summary: Possible RetainPtr misuse in WKScriptMessage.mm -
                    could leak
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit2
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: joepeck at webkit.org
                CC: andersca at apple.com, sam at webkit.org

RetainPtr<...>::operator= will +1. This looks like a possible missing adoptNS which could cause a leak:

> Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessage.mm:47:5:
>     _body = [body copy];
>     ^

However, since _body is RetainPtr<id>, how does this even work? "id" doesn't necessary respond to retain/release/copy. It looks like this could come from -[JSValue toObject] which returns id, but probably could return id<NSObject>.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list