WebKit Bugzilla
Attachment 369054 Details for
Bug 196572
: Web Inspector: Uncaught Exception: null is not an object (evaluating 'resource.parentFrame.securityOrigin')
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-196572-20190503222901.patch (text/plain), 4.32 KB, created by
Devin Rousso
on 2019-05-03 22:29:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-05-03 22:29:01 PDT
Size:
4.32 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 97206c896b10ddf3ad958b68b3f8bce3e8085713..0c85e831e9b58f2f836629daa0d297a64d062975 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-03 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Uncaught Exception: null is not an object (evaluating 'resource.parentFrame.securityOrigin') >+ https://bugs.webkit.org/show_bug.cgi?id=196572 >+ <rdar://problem/49578338> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/SourcesNavigationSidebarPanel.js: >+ (WI.SourcesNavigationSidebarPanel.prototype._addResource): >+ > 2019-05-03 Devin Rousso <drousso@apple.com> > > Web Inspector: DOM: rename "low power" to "display composited" >diff --git a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js >index f0e94fbad16f00082e3dc9ef951efdd12a2bbeb2..a21bae8d0d87045491ad3d9057cce54326c4d5a2 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js >@@ -668,16 +668,27 @@ WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W > origin = resource.urlComponents.scheme + "://" + resource.urlComponents.host; > if (resource.urlComponents.port) > origin += ":" + resource.urlComponents.port; >- } else >+ } else if (resource.parentFrame) > origin = resource.parentFrame.securityOrigin; > >- let frameTreeElement = this._originTreeElementMap.get(origin); >- if (!frameTreeElement) { >- frameTreeElement = new WI.FolderTreeElement(origin, origin === resource.parentFrame.securityOrigin ? resource.parentFrame : null); >- this._originTreeElementMap.set(origin, frameTreeElement); >+ let parentTreeElement = null; >+ if (origin) { >+ let frameTreeElement = this._originTreeElementMap.get(origin); >+ if (!frameTreeElement) { >+ frameTreeElement = new WI.FolderTreeElement(origin, origin === resource.parentFrame.securityOrigin ? resource.parentFrame : null); >+ this._originTreeElementMap.set(origin, frameTreeElement); > >- let index = insertionIndexForObjectInListSortedByFunction(frameTreeElement, this._resourcesTreeOutline.children, this._boundCompareTreeElements); >- this._resourcesTreeOutline.insertChild(frameTreeElement, index); >+ let index = insertionIndexForObjectInListSortedByFunction(frameTreeElement, this._resourcesTreeOutline.children, this._boundCompareTreeElements); >+ this._resourcesTreeOutline.insertChild(frameTreeElement, index); >+ } >+ >+ let subpath = resource.urlComponents.path; >+ if (subpath && subpath[0] === "/") >+ subpath = subpath.substring(1); >+ >+ parentTreeElement = frameTreeElement.createFoldersAsNeededForSubpath(subpath); >+ } else { >+ parentTreeElement = this._resourcesTreeOutline; > } > > let resourceTreeElement = null; >@@ -686,13 +697,8 @@ WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W > else > resourceTreeElement = new WI.ResourceTreeElement(resource, resource, {allowDirectoryAsName: true, hideOrigin: true}); > >- let subpath = resource.urlComponents.path; >- if (subpath && subpath[0] === "/") >- subpath = subpath.substring(1); >- >- let parent = frameTreeElement.createFoldersAsNeededForSubpath(subpath); >- let index = insertionIndexForObjectInListSortedByFunction(resourceTreeElement, parent.children, this._boundCompareTreeElements); >- parent.insertChild(resourceTreeElement, index); >+ let index = insertionIndexForObjectInListSortedByFunction(resourceTreeElement, parentTreeElement.children, this._boundCompareTreeElements); >+ parentTreeElement.insertChild(resourceTreeElement, index); > } > > if (resource.type === WI.Resource.Type.Document || resource.type === WI.Resource.Type.Script) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 196572
:
369054
|
369061
|
369531