RESOLVED FIXED 214786
Add null checks in ResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=214786
Summary Add null checks in ResourceLoader
Alex Christensen
Reported 2020-07-25 10:01:13 PDT
Add null checks in ResourceLoader
Attachments
Patch (4.69 KB, patch)
2020-07-25 10:07 PDT, Alex Christensen
no flags
Patch (4.69 KB, patch)
2020-07-25 11:32 PDT, Alex Christensen
no flags
Patch (4.33 KB, patch)
2020-07-27 23:48 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2020-07-25 10:07:13 PDT
Alex Christensen
Comment 2 2020-07-25 11:32:37 PDT
Alex Christensen
Comment 3 2020-07-25 12:18:33 PDT
Well it doesn't crash any more, but it doesn't finish loading. It prints this out: /Users/.../Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm(258) : void WebCore::WebCoreAVFResourceLoader::startLoading() ERROR: Failed to start load for media at url data:audio/mp3;base64,//uQx
Geoffrey Garen
Comment 4 2020-07-26 09:09:51 PDT
Ews failure looks real
Alex Christensen
Comment 5 2020-07-27 23:48:07 PDT
youenn fablet
Comment 6 2020-07-28 08:53:44 PDT
Comment on attachment 405343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405343&action=review > Source/WebCore/ChangeLog:12 > + The original patch for this has a test that would reach this code, but it never finishes loading. Can we do an API test and use a timer to conclude the test (and verify it does not hit some debug assert for instance)? > Source/WebCore/loader/ResourceLoader.cpp:126 > + if (!m_documentLoader || !m_documentLoader->frame()) { Can we keep ASSERT(m_documentLoader)?
Alex Christensen
Comment 7 2020-07-28 09:15:58 PDT
Comment on attachment 405343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405343&action=review >> Source/WebCore/ChangeLog:12 >> + The original patch for this has a test that would reach this code, but it never finishes loading. > > Can we do an API test and use a timer to conclude the test (and verify it does not hit some debug assert for instance)? I tried that. It didn't trigger the crash before the change. I spent lots of time looking into it. >> Source/WebCore/loader/ResourceLoader.cpp:126 >> + if (!m_documentLoader || !m_documentLoader->frame()) { > > Can we keep ASSERT(m_documentLoader)? No, that would be an invalid assertion. m_documentLoader can be null here.
EWS
Comment 8 2020-07-28 09:30:39 PDT
Committed r264990: <https://trac.webkit.org/changeset/264990> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405343 [details].
Radar WebKit Bug Importer
Comment 9 2020-07-28 09:31:20 PDT
Note You need to log in before you can comment on or make changes to this bug.