WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
222125
AX: Update macOS attribute initializers to be more modern
https://bugs.webkit.org/show_bug.cgi?id=222125
Summary
AX: Update macOS attribute initializers to be more modern
chris fleizach
Reported
2021-02-18 12:32:21 PST
> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1601 > + auto tempArray = adoptNS([[NSMutableArray alloc] initWithArray:attributes]); > + [tempArray addObject:NSAccessibilityEmbeddedImageDescriptionAttribute]; > + [tempArray addObject:NSAccessibilityURLAttribute]; > + imageAttrs = tempArray.leakRef(); > + }
adoptNS(...).leakRef() seems to be a no-op, so I'm not sure what it's doing here. This applies to all the other initializers in this function as well. Additionally, it's a little weird that every attribute dictionary is initialized the first time this method is called, rather than have a separate static/NeverDestroyed method for each, so the cost is only paid when at item of the specific type is passed in.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-02-18 12:32:40 PST
<
rdar://problem/74489846
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug