[chromium] Check whether an active document loader exists before accessing it
Created attachment 140732 [details] Patch
Comment on attachment 140732 [details] Patch Any chance of a layout test for this?
Comment on attachment 140732 [details] Patch It seems like webView->page()->mainFrame()->loader() would be a useful local here. :) Also, how do we test this?
Created attachment 140992 [details] Patch
I tried to come up with a test but failed Although FrameLoader::loadInSameDocument which invokes this method does not have a provisional document loader, we're seeing crashes where the FrameLoader is in provisional state, and thus activeDocumentLoader returns NULL. Lacking any understanding of how this can happen, we do this check here to avoid crashing.
Attachment 140992 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/chromium/ChangeLog', u'Sourc..." exit_code: 1 Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:642: Use 0 or null instead of NULL (even in *comments*). [readability/null] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 140999 [details] Patch
Comment on attachment 140999 [details] Patch Thank you. Sometimes we fight the loader and the loader wins.
Comment on attachment 140999 [details] Patch Clearing flags on attachment: 140999 Committed r116556: <http://trac.webkit.org/changeset/116556>
All reviewed patches have been landed. Closing bug.