Summary: | REGRESSION (r254706): Crash under WebProcessPool::terminateServiceWorkerProcess() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | Service Workers | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, beidson, commit-queue, darin, ggaren, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 206325 | ||||||
Attachments: |
|
Description
Chris Dumez
2020-02-06 14:28:23 PST
Created attachment 389997 [details]
Patch
Comment on attachment 389997 [details]
Patch
r=me
Comment on attachment 389997 [details] Patch Clearing flags on attachment: 389997 Committed r255989: <https://trac.webkit.org/changeset/255989> All reviewed patches have been landed. Closing bug. Comment on attachment 389997 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389997&action=review > Source/WebKit/UIProcess/WebProcessPool.cpp:1779 > auto protectedThis = makeRef(*this); Is this still helpful? > Source/WebKit/UIProcess/WebProcessPool.cpp:1780 > + if (RefPtr<WebProcessProxy> process = m_serviceWorkerProcesses.get({ domain, sessionID }).get()) { Can this use makeRefPtr? Comment on attachment 389997 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389997&action=review >> Source/WebKit/UIProcess/WebProcessPool.cpp:1779 >> auto protectedThis = makeRef(*this); > > Is this still helpful? I don't think so since the WebProcessProxy refs its WebProcessPool. That said, I don't think it hurts much to keep it and it did not feel right to remove a protector in a crash fix. >> Source/WebKit/UIProcess/WebProcessPool.cpp:1780 >> + if (RefPtr<WebProcessProxy> process = m_serviceWorkerProcesses.get({ domain, sessionID }).get()) { > > Can this use makeRefPtr? Yes, I did not realize this was the preferred pattern. I can switch. (In reply to Chris Dumez from comment #7) > Comment on attachment 389997 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=389997&action=review > > >> Source/WebKit/UIProcess/WebProcessPool.cpp:1779 > >> auto protectedThis = makeRef(*this); > > > > Is this still helpful? > > I don't think so since the WebProcessProxy refs its WebProcessPool. That > said, I don't think it hurts much to keep it and it did not feel right to > remove a protector in a crash fix. > > >> Source/WebKit/UIProcess/WebProcessPool.cpp:1780 > >> + if (RefPtr<WebProcessProxy> process = m_serviceWorkerProcesses.get({ domain, sessionID }).get()) { > > > > Can this use makeRefPtr? > > Yes, I did not realize this was the preferred pattern. I can switch. <https://trac.webkit.org/changeset/256022> Comment on attachment 389997 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389997&action=review >>> Source/WebKit/UIProcess/WebProcessPool.cpp:1780 >>> + if (RefPtr<WebProcessProxy> process = m_serviceWorkerProcesses.get({ domain, sessionID }).get()) { >> >> Can this use makeRefPtr? > > Yes, I did not realize this was the preferred pattern. I can switch. Not sure we have 100% consensus. What I like about makeRefPtr is that it emphasizes the lifetime part without possible doing an upcast as a side effect. For example, makeRefPtr on a HTMLPluginElement rather than using RefPtr<Element>. What some others don’t like about makeRefPtr is that the concrete type is implicit and you can’t see it when reading the code (same as with other cases where we use auto or an expression without putting it into local variable). |