Exit early in FrameLoader::loadURL when redirecting to another frame, previously we were preparing request needlessly, doing it twice in case of frame redirecting. Also move some variables to where they are actually used.
Created attachment 396984 [details] Patch
Comment on attachment 396984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396984&action=review r=me > Source/WebCore/loader/FrameLoader.cpp:1358 > + Frame* targetFrame = isFormSubmission ? nullptr : findFrameForNavigation(effectiveFrameName); This should be RefPtr.
Comment on attachment 396984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396984&action=review >> Source/WebCore/loader/FrameLoader.cpp:1358 >> + Frame* targetFrame = isFormSubmission ? nullptr : findFrameForNavigation(effectiveFrameName); > > This should be RefPtr. I think our latest style would be: auto targetFrame = isFormSubmission ? nullptr : makeRefPtr(findFrameForNavigation(effectiveFrameName)); Or change findFrameForNavigation to return a RefPtr. Move the makeRefPtr outside the ? : if needed to make things compile.
Created attachment 397060 [details] Patch
Created attachment 397062 [details] Patch
Committed r260423: <https://trac.webkit.org/changeset/260423> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397062 [details].
<rdar://problem/62099510>