| Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
|
| index 486429cc3f224f0c0076684bcaf36d59ff928061..f738480ab24c0a375b5f277c4e1499bdb0325d86 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
|
| @@ -472,8 +472,8 @@ WebInspector.DeviceModeView.prototype = {
|
| visiblePageRect.top,
|
| Math.min(pageImage.naturalWidth, screenRect.width),
|
| Math.min(pageImage.naturalHeight, screenRect.height));
|
| - var mainFrame = mainTarget.resourceTreeModel.mainFrame;
|
| - var fileName = mainFrame ? mainFrame.url.trimURL().removeURLFragment() : "";
|
| + var url = mainTarget && mainTarget.inspectedURL();
|
| + var fileName = url ? url.trimURL().removeURLFragment() : "";
|
| if (this._model.type() === WebInspector.DeviceModeModel.Type.Device)
|
| fileName += WebInspector.UIString("(%s)", this._model.device().title);
|
| // Trigger download.
|
|
|