Title: [219972] trunk/Source/WebInspectorUI
Revision
219972
Author
[email protected]
Date
2017-07-26 17:13:20 -0700 (Wed, 26 Jul 2017)

Log Message

Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)')
https://bugs.webkit.org/show_bug.cgi?id=174823

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection):
(WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow):
Early return if the view has not called initialLayout, as the rows might not have been
constructed yet.

* UserInterface/Views/View.js:
(WebInspector.View.prototype.get didInitialLayout): Added.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (219971 => 219972)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-07-27 00:05:33 UTC (rev 219971)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-07-27 00:13:20 UTC (rev 219972)
@@ -1,5 +1,24 @@
 2017-07-26  Devin Rousso  <[email protected]>
 
+        Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)')
+        https://bugs.webkit.org/show_bug.cgi?id=174823
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/CanvasDetailsSidebarPanel.js:
+        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
+        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
+        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):
+        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection):
+        (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow):
+        Early return if the view has not called initialLayout, as the rows might not have been
+        constructed yet.
+
+        * UserInterface/Views/View.js:
+        (WebInspector.View.prototype.get didInitialLayout): Added.
+
+2017-07-26  Devin Rousso  <[email protected]>
+
         Web Inspector: create protocol for recording Canvas contexts
         https://bugs.webkit.org/show_bug.cgi?id=174481
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js (219971 => 219972)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js	2017-07-27 00:05:33 UTC (rev 219971)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js	2017-07-27 00:13:20 UTC (rev 219972)
@@ -143,9 +143,6 @@
 
     _refreshIdentitySection()
     {
-        if (!this._canvas)
-            return;
-
         this._nameRow.value = this._canvas.displayName;
         this._typeRow.value = WebInspector.Canvas.displayNameForContextType(this._canvas.contextType);
         this._formatMemoryRow();
@@ -153,7 +150,7 @@
 
     _refreshSourceSection()
     {
-        if (!this._canvas)
+        if (!this.didInitialLayout)
             return;
 
         this._nodeRow.value = this._canvas.cssCanvasName ? null : emDash;
@@ -224,9 +221,6 @@
 
     _refreshAttributesSection()
     {
-        if (!this._canvas)
-            return;
-
         if (isEmptyObject(this._canvas.contextAttributes)) {
             // Remove the DataGrid to show the placeholder text.
             this._attributesDataGridRow.dataGrid = null;
@@ -254,7 +248,7 @@
 
     _refreshCSSCanvasSection()
     {
-        if (!this._canvas)
+        if (!this.didInitialLayout)
             return;
 
         if (!this._canvas.cssCanvasName) {
@@ -279,6 +273,9 @@
 
     _formatMemoryRow()
     {
+        if (!this.didInitialLayout)
+            return;
+
         if (!this._canvas.memoryCost || isNaN(this._canvas.memoryCost)) {
             this._memoryRow.value = emDash;
             return;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/View.js (219971 => 219972)


--- trunk/Source/WebInspectorUI/UserInterface/Views/View.js	2017-07-27 00:05:33 UTC (rev 219971)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/View.js	2017-07-27 00:13:20 UTC (rev 219972)
@@ -173,6 +173,7 @@
     // Protected
 
     get layoutReason() { return this._layoutReason; }
+    get didInitialLayout() { return this._didInitialLayout; }
 
     didMoveToWindow(isAttachedToRoot)
     {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to