Changeset 245167 in webkit
- Timestamp:
- May 9, 2019 5:32:09 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r245166 r245167 1 2019-05-09 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Uncaught Exception: null is not an object (evaluating 'resource.parentFrame.securityOrigin') 4 https://bugs.webkit.org/show_bug.cgi?id=196572 5 <rdar://problem/49578338> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/SourcesNavigationSidebarPanel.js: 10 (WI.SourcesNavigationSidebarPanel.prototype._addResource): 11 1 12 2019-05-09 Devin Rousso <drousso@apple.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js
r245060 r245167 669 669 if (resource.urlComponents.port) 670 670 origin += ":" + resource.urlComponents.port; 671 } else 671 } else if (resource.parentFrame) 672 672 origin = resource.parentFrame.securityOrigin; 673 673 674 let frameTreeElement = this._originTreeElementMap.get(origin); 675 if (!frameTreeElement) { 676 frameTreeElement = new WI.FolderTreeElement(origin, origin === resource.parentFrame.securityOrigin ? resource.parentFrame : null); 677 this._originTreeElementMap.set(origin, frameTreeElement); 678 679 let index = insertionIndexForObjectInListSortedByFunction(frameTreeElement, this._resourcesTreeOutline.children, this._boundCompareTreeElements); 680 this._resourcesTreeOutline.insertChild(frameTreeElement, index); 674 let parentTreeElement = null; 675 if (origin) { 676 let frameTreeElement = this._originTreeElementMap.get(origin); 677 if (!frameTreeElement) { 678 frameTreeElement = new WI.FolderTreeElement(origin, origin === resource.parentFrame.securityOrigin ? resource.parentFrame : null); 679 this._originTreeElementMap.set(origin, frameTreeElement); 680 681 let index = insertionIndexForObjectInListSortedByFunction(frameTreeElement, this._resourcesTreeOutline.children, this._boundCompareTreeElements); 682 this._resourcesTreeOutline.insertChild(frameTreeElement, index); 683 } 684 685 let subpath = resource.urlComponents.path; 686 if (subpath && subpath[0] === "/") 687 subpath = subpath.substring(1); 688 689 parentTreeElement = frameTreeElement.createFoldersAsNeededForSubpath(subpath); 690 } else { 691 parentTreeElement = this._resourcesTreeOutline; 681 692 } 682 693 … … 687 698 resourceTreeElement = new WI.ResourceTreeElement(resource, resource, {allowDirectoryAsName: true, hideOrigin: true}); 688 699 689 let subpath = resource.urlComponents.path; 690 if (subpath && subpath[0] === "/") 691 subpath = subpath.substring(1); 692 693 let parent = frameTreeElement.createFoldersAsNeededForSubpath(subpath); 694 let index = insertionIndexForObjectInListSortedByFunction(resourceTreeElement, parent.children, this._boundCompareTreeElements); 695 parent.insertChild(resourceTreeElement, index); 700 let index = insertionIndexForObjectInListSortedByFunction(resourceTreeElement, parentTreeElement.children, this._boundCompareTreeElements); 701 parentTreeElement.insertChild(resourceTreeElement, index); 696 702 } 697 703
Note: See TracChangeset
for help on using the changeset viewer.