| Index: third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
|
| index 2347ad521bfae62a6e034df302ef24ae7c486265..4f9e5fac6378a60b1fbb3943094af577f7bf932d 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
|
| @@ -159,11 +159,16 @@ WebInspector.DOMPresentationUtils.linkifyDeferredNodeReference = function(deferr
|
| */
|
| WebInspector.DOMPresentationUtils.buildImagePreviewContents = function(target, originalImageURL, showDimensions, userCallback, precomputedFeatures)
|
| {
|
| - var resource = target.resourceTreeModel.resourceForURL(originalImageURL);
|
| + var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target);
|
| + if (!resourceTreeModel) {
|
| + userCallback();
|
| + return;
|
| + }
|
| + var resource = resourceTreeModel.resourceForURL(originalImageURL);
|
| var imageURL = originalImageURL;
|
| if (!isImageResource(resource) && precomputedFeatures && precomputedFeatures.currentSrc) {
|
| imageURL = precomputedFeatures.currentSrc;
|
| - resource = target.resourceTreeModel.resourceForURL(imageURL);
|
| + resource = resourceTreeModel.resourceForURL(imageURL);
|
| }
|
| if (!isImageResource(resource)) {
|
| userCallback();
|
|
|