Unable to access DocumentLoader inside dispatchDecidePolicyForNavigationAction When the FrameLoaderClient's dispatchDecidePolicyForNavigationAction method is called, the FrameLoader's provisionalDocumentLoader will be NULL. This happens because the provisionalDocumentLoader is promoted to the FrameLoader's policyDocumentLoader before dispatchDecidePolicyForNavigationAction is called. However, the FrameLoader's policyDocumentLoader is a private member, which lacks a public accessor. So, this bug is about adding a public accessor for the policyDocumentLoader. Why would this be useful? A FrameLoaderClient that subclasses DocumentLoader (via the createDocumentLoader method) may want to access DocumentLoader specific fields during FrameLoaderClient callbacks.
Created attachment 20728 [details] patch This patch adds FrameLoader::policyDocumentLoader, and it also changes the signature of FrameLoader::provisionalDocumentLoader to be const. That was done for consistency with the other related methods.
FYI, I discussed this patch with andersca on #webkit, and at the time he agreed that this was a good idea.
Comment on attachment 20728 [details] patch r=me
M WebCore/ChangeLog M WebCore/WebCore.base.exp M WebCore/WebCore.order M WebCore/loader/FrameLoader.cpp M WebCore/loader/FrameLoader.h Committed r32320