| Index: chrome/browser/ui/browser_commands.cc
|
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
| index 27da5db41d9150a8ea2f8ea5ad5aeb71a62d8f07..f47ffcbd61b228124cf77216ee07e7acb06ba00e 100644
|
| --- a/chrome/browser/ui/browser_commands.cc
|
| +++ b/chrome/browser/ui/browser_commands.cc
|
| @@ -1003,7 +1003,9 @@ void ViewSource(Browser* browser,
|
| // Note that Clone does not copy the pending or transient entries, so the
|
| // active entry in view_source_contents will be the last committed entry.
|
| WebContents* view_source_contents = contents->Clone();
|
| - view_source_contents->GetController().PruneAllButActive();
|
| + DCHECK(view_source_contents->GetController().CanPruneAllButVisible());
|
| + if (!view_source_contents->GetController().PruneAllButVisible())
|
| + return;
|
| NavigationEntry* active_entry =
|
| view_source_contents->GetController().GetActiveEntry();
|
| if (!active_entry)
|
|
|