WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
236196
Adjust `platformResetStateToConsistentValues` to avoid grabbing the general pasteboard when possible
https://bugs.webkit.org/show_bug.cgi?id=236196
Summary
Adjust `platformResetStateToConsistentValues` to avoid grabbing the general p...
Wenson Hsieh
Reported
2022-02-05 20:46:40 PST
Make it possible to work around
rdar://86327357
by skipping layout tests that time out.
Attachments
Patch
(15.38 KB, patch)
2022-02-05 21:06 PST
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2022-02-05 21:06:36 PST
Created
attachment 451024
[details]
Patch
Wenson Hsieh
Comment 2
2022-02-06 07:39:41 PST
Comment on
attachment 451024
[details]
Patch Thanks for the review!
EWS
Comment 3
2022-02-06 08:15:19 PST
Committed
r289169
(
246865@main
): <
https://commits.webkit.org/246865@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 451024
[details]
.
Radar WebKit Bug Importer
Comment 4
2022-02-06 08:16:17 PST
<
rdar://problem/88544615
>
Alexey Proskuryakov
Comment 5
2022-02-06 11:40:54 PST
It's great to limit the damage like this. Are the pasteboardChanged notifications synchronous? A little concerned if this adds more races to the execution.
Wenson Hsieh
Comment 6
2022-02-06 11:46:13 PST
(In reply to Alexey Proskuryakov from
comment #5
)
> It's great to limit the damage like this. > > Are the pasteboardChanged notifications synchronous? A little concerned if > this adds more races to the execution.
Indeed they are! (I verified this in a separate test app that calls `-[UIPasteboard setItemProviders:]` and listens for this notification, with logging statements): ``` - (void)viewDidLoad { [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pasteboardChanged:) name:UIPasteboardChangedNotification object:nil]; __auto_type pasteboard = [UIPasteboard generalPasteboard]; __auto_type string = [[NSAttributedString alloc] initWithString:@"hello world"]; __auto_type itemProvider = [[NSItemProvider alloc] initWithObject:string]; NSLog(@"%@ change count before: %tu", pasteboard, pasteboard.changeCount); [pasteboard setItemProviders:@[ itemProvider ]]; NSLog(@"%@ change count after: %tu", pasteboard, pasteboard.changeCount); } - (void)pasteboardChanged:(NSNotification *)notification { NSLog(@"Pasteboard changed!"); } ``` with output: ``` UIPasteboardTest[25500:1935953] <_UIConcretePasteboard: 0x6000026604c0> change count before: 20398 UIPasteboardTest[25500:1935953] Pasteboard changed! UIPasteboardTest[25500:1935953] <_UIConcretePasteboard: 0x6000026604c0> change count after: 20399 ```
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