Bug 231817 - REGRESSION (r282230): WebKit::registerScheduledActivityHandler() leaks an xpc_object_t
Summary: REGRESSION (r282230): WebKit::registerScheduledActivityHandler() leaks an xpc...
Status: RESOLVED DUPLICATE of bug 231309
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebXR (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Keywords: InRadar
Depends on: 230052
  Show dependency treegraph
Reported: 2021-10-15 10:34 PDT by David Kilzer (:ddkilzer)
Modified: 2021-10-15 12:20 PDT (History)
6 users (show)

See Also:

Patch v1 (2.58 KB, patch)
2021-10-15 10:38 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v2 (1.94 KB, patch)
2021-10-15 12:10 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2021-10-15 10:34:57 PDT
WebKit::registerScheduledActivityHandler() leaks an xpc_object_t.

Found by the clang static analyzer.

Regressed here:

    Add PrivateClickMeasurement daemon
Comment 1 David Kilzer (:ddkilzer) 2021-10-15 10:36:19 PDT
Fixed link:  <https://trac.webkit.org/r282230>
Comment 2 Radar WebKit Bug Importer 2021-10-15 10:36:40 PDT
Comment 3 David Kilzer (:ddkilzer) 2021-10-15 10:38:29 PDT
Created attachment 441400 [details]
Patch v1
Comment 4 David Kilzer (:ddkilzer) 2021-10-15 12:09:30 PDT
Comment on attachment 441400 [details]
Patch v1

Wrong patch!
Comment 5 David Kilzer (:ddkilzer) 2021-10-15 12:10:54 PDT
Created attachment 441413 [details]
Patch v2
Comment 6 David Kilzer (:ddkilzer) 2021-10-15 12:12:02 PDT
Comment on attachment 441413 [details]
Patch v2

Looks like I need to update.  Maybe this was fixed already?
Comment 7 David Kilzer (:ddkilzer) 2021-10-15 12:14:20 PDT
Fixed by Bug 231309 using adoptNS.  ¯\_(ツ)_/¯

*** This bug has been marked as a duplicate of bug 231309 ***
Comment 8 David Kilzer (:ddkilzer) 2021-10-15 12:20:47 PDT
(In reply to David Kilzer (:ddkilzer) from comment #7)
> Fixed by Bug 231309 using adoptNS.  ¯\_(ツ)_/¯

To be clear, adoptNS() should work fine with xpc_object_t in Cocoa source files.