Chromium Code Reviews| 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..77a42d3bbe5562997a634e94040166fb3f0b3418 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
| @@ -472,7 +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 resourceTreeModel = mainTarget && WebInspector.ResourceTreeModel.fromTarget(mainTarget); |
| + var mainFrame = resourceTreeModel && resourceTreeModel.mainFrame; |
| var fileName = mainFrame ? mainFrame.url.trimURL().removeURLFragment() : ""; |
|
dgozman
2016/08/19 20:23:37
All this code looks like WI.targetManager.inspecte
eostroukhov
2016/08/20 01:22:30
Done.
|
| if (this._model.type() === WebInspector.DeviceModeModel.Type.Device) |
| fileName += WebInspector.UIString("(%s)", this._model.device().title); |