WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
194239
Take additional process assertion while downloading
https://bugs.webkit.org/show_bug.cgi?id=194239
Summary
Take additional process assertion while downloading
Brady Eidson
Reported
2019-02-04 13:46:21 PST
Take additional process assertion while downloading <
rdar://problem/47741356
>
Attachments
Patch
(10.08 KB, patch)
2019-02-04 14:51 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(10.16 KB, patch)
2019-02-04 15:04 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(10.22 KB, patch)
2019-02-04 15:17 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(10.22 KB, patch)
2019-02-04 15:42 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2019-02-04 14:51:23 PST
Created
attachment 361103
[details]
Patch
Chris Dumez
Comment 2
2019-02-04 14:55:49 PST
Comment on
attachment 361103
[details]
Patch r=me
Brady Eidson
Comment 3
2019-02-04 15:04:56 PST
Created
attachment 361105
[details]
Patch
Brady Eidson
Comment 4
2019-02-04 15:17:13 PST
Created
attachment 361108
[details]
Patch
Brady Eidson
Comment 5
2019-02-04 15:42:15 PST
Created
attachment 361113
[details]
Patch
WebKit Commit Bot
Comment 6
2019-02-04 17:27:28 PST
Comment on
attachment 361113
[details]
Patch Clearing flags on attachment: 361113 Committed
r240954
: <
https://trac.webkit.org/changeset/240954
>
WebKit Commit Bot
Comment 7
2019-02-04 17:27:30 PST
All reviewed patches have been landed. Closing bug.
David Quesada
Comment 8
2019-02-05 08:27:45 PST
Don't we also need to take the assertion in DownloadManager::resumeDownload()?
Chris Dumez
Comment 9
2019-02-05 08:50:35 PST
(In reply to David Quesada from
comment #8
)
> Don't we also need to take the assertion in > DownloadManager::resumeDownload()?
Well, if you want to resume downloads, I guess that makes sense :P
Brady Eidson
Comment 10
2019-02-05 09:05:17 PST
Yup, I could've sworn I searched for all the m_downloads.add calls but I clearly missed that one. I'm going to refactor that map to make it impossible to miss in the future.
Brady Eidson
Comment 11
2019-02-05 10:51:34 PST
Following up in
https://bugs.webkit.org/show_bug.cgi?id=194294
Geoffrey Garen
Comment 12
2019-02-05 20:54:34 PST
Comment on
attachment 361113
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=361113&action=review
> Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp:79 > + if (m_downloads.size() == 1) { > + ASSERT(!m_downloadAssertion); > + m_downloadAssertion = std::make_unique<ProcessAssertion>(getpid(), "WebKit downloads"_s, AssertionState::Download); > + }
I think this would be clearer and more robust if you just tested !m_downloadAssertion. It's true that m_downloads.size() should be 1 if and only if m_downloadAssertion is null. But there's no need to assert that relationship or depend on it.
> Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp:185 > + ASSERT(m_downloadAssertion);
Here, we can ASSERT(m_downloadAssertion) regardless of whether m_downloads is empty. We believe that we should always have an assertion while downloading.
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