WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
211002
WebPasteboardProxy::getPasteboardStringsForType() and WebPasteboardProxy::readURLFromPasteboard() should check return value of SharedMemory::createHandle()
https://bugs.webkit.org/show_bug.cgi?id=211002
Summary
WebPasteboardProxy::getPasteboardStringsForType() and WebPasteboardProxy::rea...
David Kilzer (:ddkilzer)
Reported
2020-04-24 15:57:33 PDT
WebPasteboardProxy::getPasteboardStringsForType() and WebPasteboardProxy::readURLFromPasteboard() should check return value of SharedMemory::createHandle(). <
rdar://problem/60103950
>
Attachments
Patch v1
(2.27 KB, patch)
2020-04-24 16:02 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
Patch
(2.38 KB, patch)
2020-09-01 11:05 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2020-04-24 16:02:14 PDT
Created
attachment 397525
[details]
Patch v1
David Kilzer (:ddkilzer)
Comment 2
2020-04-24 18:12:55 PDT
Comment on
attachment 397525
[details]
Patch v1 This code is only used on Apple platforms, so adding cq+ and ignoring build errors on GTK and WPE ports.
EWS
Comment 3
2020-04-24 18:33:02 PDT
Committed
r260689
: <
https://trac.webkit.org/changeset/260689
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 397525
[details]
.
Darin Adler
Comment 4
2020-04-25 10:29:56 PDT
Are we going to add WARN_UNUSED_RETURN to createHandle?
David Kilzer (:ddkilzer)
Comment 5
2020-04-26 20:16:11 PDT
(In reply to Darin Adler from
comment #4
)
> Are we going to add WARN_UNUSED_RETURN to createHandle?
Yes, after we fix all the individual issues. Tracked by <
rdar://problem/62274167
>.
Darin Adler
Comment 6
2020-04-26 22:03:29 PDT
Great!
WebKit Commit Bot
Comment 7
2020-05-06 18:54:58 PDT
Re-opened since this is blocked by
bug 211542
Kate Cheney
Comment 8
2020-09-01 11:05:44 PDT
Created
attachment 407698
[details]
Patch
Kate Cheney
Comment 9
2020-09-01 11:11:04 PDT
Thanks for the review Wenson. Going to wait for EWS before I cq+.
David Kilzer (:ddkilzer)
Comment 10
2020-09-01 13:40:07 PDT
Comment on
attachment 407698
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=407698&action=review
> Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:217 > - sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly); > + if (!sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly)) > + return completionHandler({ });
To find all places where this return value should be changed (and to prevent this from being re-introduced), change this in Source/WebKit/Platform/SharedMemory.h: bool createHandle(Handle&, Protection); To this: WARN_UNUSED_RETURN bool createHandle(Handle&, Protection); Then fix all the warnings. (Not necessary to do for this patch.)
David Kilzer (:ddkilzer)
Comment 11
2020-09-01 13:40:36 PDT
Comment on
attachment 407698
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=407698&action=review
>> Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:217 >> + return completionHandler({ }); > > To find all places where this return value should be changed (and to prevent this from being re-introduced), change this in Source/WebKit/Platform/SharedMemory.h: > > bool createHandle(Handle&, Protection); > > To this: > > WARN_UNUSED_RETURN bool createHandle(Handle&, Protection); > > Then fix all the warnings. (Not necessary to do for this patch.)
Aaaaaand...I should have read the comments first. :)
Kate Cheney
Comment 12
2020-09-01 13:58:53 PDT
(In reply to David Kilzer (:ddkilzer) from
comment #11
)
> Comment on
attachment 407698
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=407698&action=review
> > >> Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:217 > >> + return completionHandler({ }); > > > > To find all places where this return value should be changed (and to prevent this from being re-introduced), change this in Source/WebKit/Platform/SharedMemory.h: > > > > bool createHandle(Handle&, Protection); > > > > To this: > > > > WARN_UNUSED_RETURN bool createHandle(Handle&, Protection); > > > > Then fix all the warnings. (Not necessary to do for this patch.) > > Aaaaaand...I should have read the comments first. :)
It's a good reminder! I can tackle that next.
EWS
Comment 13
2020-09-01 15:56:24 PDT
Committed
r266416
: <
https://trac.webkit.org/changeset/266416
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 407698
[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