| Index: chrome/browser/tab_contents/tab_contents.cc
|
| diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
|
| index 7769d34661382507d1813da9d0f4815bd9416f56..a5cf474b9f1869f46621a2955f08e2d2465e5235 100644
|
| --- a/chrome/browser/tab_contents/tab_contents.cc
|
| +++ b/chrome/browser/tab_contents/tab_contents.cc
|
| @@ -1523,8 +1523,14 @@ int TabContents::GetZoomPercent(bool* enable_increment,
|
|
|
| void TabContents::ViewSource()
|
| {
|
| - if (delegate_)
|
| - delegate_->ViewSourceForTab(this);
|
| + if (!delegate_)
|
| + return;
|
| +
|
| + NavigationEntry* active_entry = controller().GetActiveEntry();
|
| + if (!active_entry)
|
| + return;
|
| +
|
| + delegate_->ViewSourceForTab(this, active_entry->url());
|
| }
|
|
|
| // Notifies the RenderWidgetHost instance about the fact that the page is
|
|
|