WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
195497
Take UnboundedNetworking assertion when a file upload is in progress
https://bugs.webkit.org/show_bug.cgi?id=195497
Summary
Take UnboundedNetworking assertion when a file upload is in progress
Brady Eidson
Reported
2019-03-08 17:06:23 PST
Take UnboundedNetworking assertion when a file upload is in progress
Attachments
Patch
(29.08 KB, patch)
2019-03-12 14:43 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(29.08 KB, patch)
2019-03-13 09:41 PDT
,
Brady Eidson
ggaren
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2019-03-12 14:43:47 PDT
Created
attachment 364448
[details]
Patch
Geoffrey Garen
Comment 2
2019-03-12 15:29:42 PDT
Comment on
attachment 364448
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=364448&action=review
r=me, some comments below, also please update to trunk
> Source/WebKit/ChangeLog:8 > + This patch implememts whole bunch of bookkeeping in both the Networking and UI processes.
implememts => implements a
> Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:808 > +void NetworkConnectionToWebProcess::setProcessIdentifier(ProcessIdentifier processIdentifier)
setProcessIdentifier => setWebProcessIdentifier processIdentifier => webProcessIdentifier
> Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:813 > +void NetworkConnectionToWebProcess::connectionHasUploads()
connectionHasUploads => setConnectionHasUploads
> Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:820 > +void NetworkConnectionToWebProcess::connectionNoLongerHasUploads()
connectionNoLongerHasUploads => clearConnectionHasUploads
> Source/WebKit/NetworkProcess/NetworkResourceLoadMap.cpp:39 > + if (m_loadersWithUploads.size() == 1) > + m_connectionToWebProcess.connectionHasUploads();
Nit: I think it's slightly clearer to check for zero before inserting than it is to check for 1 (or more) after inserting. One reason is that it matches the check in remove. Another reason is that zero is always zero, but non-zero is not always 1.
> Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:1200 > +void NetworkProcessProxy::releaseUploadAssertion()
releaseUploadAssertion => clearUploadAssertion
> Source/WebKit/UIProcess/WebProcessPool.cpp:2502 > + if (m_processesWithUploads.size() == 1) {
Same comment about 1.
Brady Eidson
Comment 3
2019-03-12 16:19:54 PDT
(In reply to Geoffrey Garen from
comment #2
)
> Comment on
attachment 364448
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=364448&action=review
> > r=me, some comments below, also please update to trunk
I was planning on *NOT* updating to trunk, though! :)
Brady Eidson
Comment 4
2019-03-13 09:41:02 PDT
Created
attachment 364541
[details]
Patch
Geoffrey Garen
Comment 5
2019-03-13 10:32:09 PDT
Comment on
attachment 364541
[details]
Patch Not sure if I should review, but r=me :P
Chris Dumez
Comment 6
2019-03-13 10:36:35 PDT
Comment on
attachment 364541
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=364541&action=review
> Source/WebKit/NetworkProcess/NetworkResourceLoadMap.h:64 > + std::unique_ptr<ProcessAssertion> m_networkAssertion;
Where is this initialized?
Chris Dumez
Comment 7
2019-03-13 10:39:08 PDT
Comment on
attachment 364541
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=364541&action=review
> Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:268 > + std::unique_ptr<ProcessAssertion> m_uploadAssertion;
If you take a ProcessAssertion and not a ProcessAndUIAssertion, then what prevents the UIProcess from getting suspended? If the UIProcess gets suspended, how can this unbounded assertion get released?
Chris Dumez
Comment 8
2019-03-13 10:41:51 PDT
Comment on
attachment 364541
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=364541&action=review
> Source/WebKit/UIProcess/WebProcessPool.h:776 > + std::unique_ptr<ProcessAssertion> m_uiProcessUploadAssertion;
Currently seems like a misnomer no? AFAICT, it does not prevent UIProcess suspension at the moment.
Brady Eidson
Comment 9
2019-03-13 10:48:03 PDT
(In reply to Chris Dumez from
comment #7
)
> Comment on
attachment 364541
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=364541&action=review
> > > Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:268 > > + std::unique_ptr<ProcessAssertion> m_uploadAssertion; > > If you take a ProcessAssertion and not a ProcessAndUIAssertion, then what > prevents the UIProcess from getting suspended? > If the UIProcess gets suspended, how can this unbounded assertion get > released?
Let's talk in person, but basically the names you think are important are not.
Chris Dumez
Comment 10
2019-03-13 10:56:30 PDT
(In reply to Brady Eidson from
comment #9
)
> (In reply to Chris Dumez from
comment #7
) > > Comment on
attachment 364541
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=364541&action=review
> > > > > Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:268 > > > + std::unique_ptr<ProcessAssertion> m_uploadAssertion; > > > > If you take a ProcessAssertion and not a ProcessAndUIAssertion, then what > > prevents the UIProcess from getting suspended? > > If the UIProcess gets suspended, how can this unbounded assertion get > > released? > > Let's talk in person, but basically the names you think are important are > not.
Ok, looks good to me now besides the unused data member.
Brady Eidson
Comment 11
2019-03-13 10:58:03 PDT
Committed
r242891
: <
https://trac.webkit.org/changeset/242891
>
Radar WebKit Bug Importer
Comment 12
2019-03-13 10:59:18 PDT
<
rdar://problem/48854017
>
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