Summary: | REGRESSION (r220601): Crash when closing google doc after switching the order of tabs in safari | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez, commit-queue, ggaren, sam, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 212537 | ||||||
Attachments: |
|
Description
Sam Weinig
2017-08-18 09:20:15 PDT
Created attachment 318527 [details]
Patch
Comment on attachment 318527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318527&action=review > Source/WebKit/WebProcess/WebProcess.cpp:1388 > + m_pageMarkingLayersAsVolatileCounter = std::make_unique<PageMarkingLayersAsVolatileCounter>([this, completionHandler = WTFMove(completionHandler)] (RefCounterEvent) { How do we know that the WebProcess object will still be alive when our callback fires? Comment on attachment 318527 [details]
Patch
r=me
Still a little sketched out by the refcounting here.
Comment on attachment 318527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318527&action=review >> Source/WebKit/WebProcess/WebProcess.cpp:1388 >> + m_pageMarkingLayersAsVolatileCounter = std::make_unique<PageMarkingLayersAsVolatileCounter>([this, completionHandler = WTFMove(completionHandler)] (RefCounterEvent) { > > How do we know that the WebProcess object will still be alive when our callback fires? If the WebProcess does away then so does the RefCounter object, since it is a data member. If the RefCounter object is destroyed, the token gets disconnected from the RefCounter object and the valueDidChange callback cannot get called. > If the WebProcess does away then so does the RefCounter object, since it is
> a data member.
Oh, duh. :P
Comment on attachment 318527 [details] Patch Clearing flags on attachment: 318527 Committed r220931: <http://trac.webkit.org/changeset/220931> All reviewed patches have been landed. Closing bug. Heh. I guess I should have assigned this to myself when I filed it if I didn't want you to fix it before I did :). Thanks for tackling it! (In reply to Sam Weinig from comment #9) > Heh. I guess I should have assigned this to myself when I filed it if I > didn't want you to fix it before I did :). Thanks for tackling it! Oh yes :) I saw you did not assign it to yourself and cc'd me and took it a a sign you wanted me to take it if I had time. Comment on attachment 318527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318527&action=review > Source/WebKit/WebProcess/WebProcess.cpp:1390 > + return; Completion handler never called. Comment on attachment 318527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318527&action=review >> Source/WebKit/WebProcess/WebProcess.cpp:1390 >> + return; > > Completion handler never called. Well, the idea is that it is supposed to get called below when m_pageMarkingLayersAsVolatileCounter->value() becomes 0. |