Bug 231000 - Add weakThis check in addition to null check added in r282881
Summary: Add weakThis check in addition to null check added in r282881
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
: 230767 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-29 17:18 PDT by Alex Christensen
Modified: 2022-02-12 20:22 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.11 KB, patch)
2021-09-29 17:27 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (2.15 KB, patch)
2021-09-29 17:32 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-09-29 17:18:45 PDT
Remove log added in r282881
Comment 1 Alex Christensen 2021-09-29 17:27:37 PDT
Created attachment 439685 [details]
Patch
Comment 2 Alex Christensen 2021-09-29 17:32:35 PDT
Created attachment 439686 [details]
Patch
Comment 3 Chris Dumez 2021-09-29 17:34:37 PDT
Comment on attachment 439686 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=439686&action=review

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:353
>          LOADER_RELEASE_LOG("startNetworkLoad: Going to the network (description=%" PUBLIC_LOG_STRING ")", m_networkLoad->description().utf8().data());

What does m_networkLoad->description() return? Hopefully it doesn't contain anything sensitive like URL?

Also, why can't we move this LOG line *before* calling start()?
Comment 4 Brady Eidson 2021-09-29 17:49:55 PDT
Comment on attachment 439686 [details]
Patch

This patch isn't about verifying the string returns the right thing.

Putting the log line before start() makes it categorically false, as start() may not actually *start*
Comment 5 Chris Dumez 2021-09-29 18:37:30 PDT
(In reply to Brady Eidson from comment #4)
> Comment on attachment 439686 [details]
> Patch
> 
> This patch isn't about verifying the string returns the right thing.

And yet still a good thing to verify and you didn't answer.

> Putting the log line before start() makes it categorically false, as start()
> may not actually *start*

I feel like a safer fix would have been to update the actual code that introduced the regression and have NetworkLoad::start() call didCompleteWithError: asynchronously when it fails due to FTP. There are other clients to NetworkLoad than NetworkResourceLoader and having start() call that may fail synchronously and delete |this| might be an issue for other call sites as well.
Comment 6 Chris Dumez 2021-09-29 18:41:37 PDT
(In reply to Chris Dumez from comment #5)
> (In reply to Brady Eidson from comment #4)
> > Comment on attachment 439686 [details]
> > Patch
> > 
> > This patch isn't about verifying the string returns the right thing.
> 
> And yet still a good thing to verify and you didn't answer.

0x105d74000 - [pageProxyID=21, webPageID=22, frameID=3, resourceID=32, isMainResource=1, destination=3, isSynchronous=0] NetworkResourceLoader::startNetworkLoad: Going to the network (description=LocalDataTask <25187A1B-3324-4E2C-982A-AB468520286C>.<1>)

Now I have my answer.
Comment 7 EWS 2021-09-29 19:01:44 PDT
Committed r283294 (242319@main): <https://commits.webkit.org/242319@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439686 [details].
Comment 8 Radar WebKit Bug Importer 2021-09-29 19:02:16 PDT
<rdar://problem/83699294>
Comment 9 Brent Fulgham 2022-02-12 20:22:16 PST
*** Bug 230767 has been marked as a duplicate of this bug. ***