RESOLVED FIXED 220394
Use smart pointers in UIDelegate and NavigationState
https://bugs.webkit.org/show_bug.cgi?id=220394
Summary Use smart pointers in UIDelegate and NavigationState
Alex Christensen
Reported 2021-01-06 17:47:55 PST
Protect WebPageProxy in didFinishLoadForFrame
Attachments
Patch (1.69 KB, patch)
2021-01-06 17:49 PST, Alex Christensen
no flags
Patch (151.48 KB, patch)
2021-01-07 10:38 PST, Alex Christensen
ews-feeder: commit-queue-
Patch (151.67 KB, patch)
2021-01-07 10:53 PST, Alex Christensen
ews-feeder: commit-queue-
Patch (157.76 KB, patch)
2021-01-07 11:25 PST, Alex Christensen
ews-feeder: commit-queue-
Patch (149.43 KB, patch)
2021-01-07 12:18 PST, Alex Christensen
no flags
Patch (151.37 KB, patch)
2021-01-07 13:53 PST, Alex Christensen
no flags
Alex Christensen
Comment 1 2021-01-06 17:49:22 PST
Alex Christensen
Comment 2 2021-01-06 17:49:25 PST
Chris Dumez
Comment 3 2021-01-07 08:31:45 PST
Comment on attachment 417144 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417144&action=review > Source/WebKit/UIProcess/WebPageProxy.cpp:4770 > + auto protectedThis = makeRef(*this); This is unnecessary in functions called via IPC. We solved it at a global level years ago. If you look at WebPageProxy::didReceiveMessage() in generated code, you will see: auto protectedThis = makeRef(*this); We protect the WebPageProxy while calling every function due to an IPC message.
Alex Christensen
Comment 4 2021-01-07 10:38:37 PST
Alex Christensen
Comment 5 2021-01-07 10:53:05 PST
Alex Christensen
Comment 6 2021-01-07 11:25:07 PST
Alex Christensen
Comment 7 2021-01-07 12:18:01 PST
Geoffrey Garen
Comment 8 2021-01-07 12:50:07 PST
Comment on attachment 417198 [details] Patch r=me Smart pointer is definitely better than raw pointer here. Would be nice in the future just to make this lifetime mismatch impossible.
Alex Christensen
Comment 9 2021-01-07 13:53:40 PST
Comment on attachment 417198 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417198&action=review > Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:408 > - return; > + return completionHandler(false); Surprisingly this changed behavior in an undesirable way. Will revert.
Alex Christensen
Comment 10 2021-01-07 13:53:52 PST
EWS
Comment 11 2021-01-07 15:10:55 PST
Committed r271264: <https://trac.webkit.org/changeset/271264> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417209 [details].
Note You need to log in before you can comment on or make changes to this bug.