Skip to content

Commit

Permalink
REGRESSION (251295@main): -[WKWebInspectorUISaveController initWithSa…
Browse files Browse the repository at this point in the history
…veDatas:savePanel:] leaks an NSView

https://bugs.webkit.org/show_bug.cgi?id=256440
<rdar://109023427>

Reviewed by Devin Rousso.

* Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
(-[WKWebInspectorUISaveController initWithSaveDatas:savePanel:]):
- Use adoptNS().get() to fix the leak.

Canonical link: https://commits.webkit.org/263787@main
  • Loading branch information
David Kilzer authored and ddkilzer committed May 8, 2023
1 parent d57e039 commit e6f69b4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -239,7 +239,7 @@ - (id)initWithSaveDatas:(Vector<WebCore::InspectorFrontendClient::SaveData>&&)sa

_savePanel = savePanel;

self.view = [[NSView alloc] init];
self.view = adoptNS([[NSView alloc] init]).get();

NSTextField *label = [NSTextField labelWithString:WEB_UI_STRING("Format:", "Label for the save data format selector when saving data in Web Inspector")];
label.textColor = NSColor.secondaryLabelColor;
Expand Down

0 comments on commit e6f69b4

Please sign in to comment.