| Index: chrome/browser/ui/browser_commands.cc
|
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
| index 4000083732f8b3a95f64077404c6725a9fc57d2a..7613d586501cb96f8ed231cd6fd19c9bc00e2ad9 100644
|
| --- a/chrome/browser/ui/browser_commands.cc
|
| +++ b/chrome/browser/ui/browser_commands.cc
|
| @@ -1009,7 +1009,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)
|
|
|