WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
213950
[macOS] Tests that show system menu popups may fail when run concurrently
https://bugs.webkit.org/show_bug.cgi?id=213950
Summary
[macOS] Tests that show system menu popups may fail when run concurrently
Wenson Hsieh
Reported
2020-07-03 20:16:28 PDT
<
rdar://problem/64551566
>
Attachments
For EWS
(4.03 KB, patch)
2020-07-03 20:34 PDT
,
Wenson Hsieh
darin
: review+
Details
Formatted Diff
Diff
Remove NeverDestroyed.
(3.98 KB, patch)
2020-07-03 21:58 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2020-07-03 20:34:22 PDT
Created
attachment 403505
[details]
For EWS
Darin Adler
Comment 2
2020-07-03 21:14:58 PDT
Comment on
attachment 403505
[details]
For EWS View in context:
https://bugs.webkit.org/attachment.cgi?id=403505&action=review
> Tools/WebKitTestRunner/mac/TestControllerMac.mm:134 > + static NeverDestroyed<InstanceMethodSwizzler> cancelTrackingSwizzler { NSMenu.class, @selector(cancelTracking), reinterpret_cast<IMP>(swizzledCancelTracking) }; > + static NeverDestroyed<ClassMethodSwizzler> menuPopUpSwizzler { NSMenu.class, @selector(popUpContextMenu:withEvent:forView:), reinterpret_cast<IMP>(swizzledPopUpContextMenu) }; > + static NeverDestroyed<InstanceMethodSwizzler> carbonMenuPopUpSwizzler {
Do these really need NeverDestroyed? Maybe they would with ARC, but I don’t see why they need it without ARC. Keep in mind that NeverDestroyed does not make something stay alive for the duration of execution: being a global makes that happen. NeverDestroyed simply prevents the destructor from being called, which is useful for such objects if they have destructors.
Wenson Hsieh
Comment 3
2020-07-03 21:54:00 PDT
Comment on
attachment 403505
[details]
For EWS View in context:
https://bugs.webkit.org/attachment.cgi?id=403505&action=review
>> Tools/WebKitTestRunner/mac/TestControllerMac.mm:134 >> + static NeverDestroyed<InstanceMethodSwizzler> carbonMenuPopUpSwizzler { > > Do these really need NeverDestroyed? Maybe they would with ARC, but I don’t see why they need it without ARC. Keep in mind that NeverDestroyed does not make something stay alive for the duration of execution: being a global makes that happen. NeverDestroyed simply prevents the destructor from being called, which is useful for such objects if they have destructors.
That's a good point — the `NeverDestroyed<>` doesn't add anything here. I changed these into just `static InstanceMethodSwizzler …` and `static ClassMethodSwizzler …`.
Wenson Hsieh
Comment 4
2020-07-03 21:58:07 PDT
Created
attachment 403507
[details]
Remove NeverDestroyed.
EWS
Comment 5
2020-07-03 23:38:57 PDT
Committed
r263929
: <
https://trac.webkit.org/changeset/263929
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 403507
[details]
.
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