Bug 1222464 - Part 1: Save a client ID for top-level navigations on the docshell and assign it as the document ID when we start loading the document; r=jdm
For top-level navigations, we need to compute the client ID when we decide to intercept the document load, and we need to make sure the document that will be created later will end up using that same ID.
This commit is contained in:
@@ -14163,6 +14163,11 @@ nsDocShell::ChannelIntercepted(nsIInterceptedChannel* aChannel,
|
||||
if (!doc) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
} else {
|
||||
// For top-level navigations, save a document ID which will be passed to
|
||||
// the FetchEvent as the clientId later on.
|
||||
rv = nsIDocument::GenerateDocumentId(mInterceptedDocumentId);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
bool isReload = mLoadType & LOAD_CMD_RELOAD;
|
||||
|
||||
Reference in New Issue
Block a user