RESOLVED FIXED 106476
Replace unnecessary null-checks with an assert in MainResourceLoader::continueAfterNavigationPolicy
https://bugs.webkit.org/show_bug.cgi?id=106476
Summary Replace unnecessary null-checks with an assert in MainResourceLoader::continu...
Nate Chapin
Reported 2013-01-09 11:18:03 PST
This was requested in https://bugs.webkit.org/show_bug.cgi?id=106123#c20 I've convinced myself that resourceLoader will be non-null so long as continueAfterNavigationPolicy() isn't called twice with valid SubstituteData. Given that continueAfterNavigationPolicy() is only called for redirects and SubstituteData doesn't support redirects, I believe this assumptions always hold.
Attachments
patch (2.27 KB, patch)
2013-01-09 11:28 PST, Nate Chapin
no flags
Patch for landing (2.29 KB, patch)
2013-01-10 11:23 PST, Nate Chapin
no flags
Nate Chapin
Comment 1 2013-01-09 11:28:49 PST
Alexey Proskuryakov
Comment 2 2013-01-09 12:53:32 PST
Comment on attachment 181957 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=181957&action=review > Source/WebCore/loader/MainResourceLoader.cpp:192 > + ASSERT(resourceLoader && resourceLoader->shouldSendResourceLoadCallbacks()); Please break this into two lines, to make it easier to know which part failed. I'm still unconvinced that we need to assert that resourceLoader is not null though.
Nate Chapin
Comment 3 2013-01-10 11:12:09 PST
(In reply to comment #2) > (From update of attachment 181957 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=181957&action=review > > > Source/WebCore/loader/MainResourceLoader.cpp:192 > > + ASSERT(resourceLoader && resourceLoader->shouldSendResourceLoadCallbacks()); > > Please break this into two lines, to make it easier to know which part failed. > > I'm still unconvinced that we need to assert that resourceLoader is not null though. The more I think about it, the less convinced I am, too. Will land without the resourceLoader non-null assert.
Nate Chapin
Comment 4 2013-01-10 11:23:55 PST
Created attachment 182177 [details] Patch for landing
WebKit Review Bot
Comment 5 2013-01-10 12:22:58 PST
Comment on attachment 182177 [details] Patch for landing Clearing flags on attachment: 182177 Committed r139350: <http://trac.webkit.org/changeset/139350>
WebKit Review Bot
Comment 6 2013-01-10 12:23:01 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.