Loading dom/base/nsDOMWindowUtils.cpp +14 −2 Original line number Diff line number Diff line Loading @@ -2748,12 +2748,24 @@ nsDOMWindowUtils::AdvanceTimeAndRefresh(int64_t aMilliseconds) { NS_IMETHODIMP nsDOMWindowUtils::GetLastTransactionId(uint64_t* aLastTransactionId) { nsPresContext* presContext = GetPresContext(); nsCOMPtr<nsIDocShell> docShell = GetDocShell(); if (!docShell) { return NS_ERROR_UNEXPECTED; } nsCOMPtr<nsIDocShellTreeItem> rootTreeItem; docShell->GetInProcessRootTreeItem(getter_AddRefs(rootTreeItem)); docShell = do_QueryInterface(rootTreeItem); if (!docShell) { return NS_ERROR_UNEXPECTED; } nsPresContext* presContext = docShell->GetPresContext(); if (!presContext) { return NS_ERROR_UNEXPECTED; } nsRefreshDriver* driver = presContext->GetRootPresContext()->RefreshDriver(); nsRefreshDriver* driver = presContext->RefreshDriver(); *aLastTransactionId = uint64_t(driver->LastTransactionId()); return NS_OK; } Loading Loading
dom/base/nsDOMWindowUtils.cpp +14 −2 Original line number Diff line number Diff line Loading @@ -2748,12 +2748,24 @@ nsDOMWindowUtils::AdvanceTimeAndRefresh(int64_t aMilliseconds) { NS_IMETHODIMP nsDOMWindowUtils::GetLastTransactionId(uint64_t* aLastTransactionId) { nsPresContext* presContext = GetPresContext(); nsCOMPtr<nsIDocShell> docShell = GetDocShell(); if (!docShell) { return NS_ERROR_UNEXPECTED; } nsCOMPtr<nsIDocShellTreeItem> rootTreeItem; docShell->GetInProcessRootTreeItem(getter_AddRefs(rootTreeItem)); docShell = do_QueryInterface(rootTreeItem); if (!docShell) { return NS_ERROR_UNEXPECTED; } nsPresContext* presContext = docShell->GetPresContext(); if (!presContext) { return NS_ERROR_UNEXPECTED; } nsRefreshDriver* driver = presContext->GetRootPresContext()->RefreshDriver(); nsRefreshDriver* driver = presContext->RefreshDriver(); *aLastTransactionId = uint64_t(driver->LastTransactionId()); return NS_OK; } Loading