Changeset 219972 in webkit


Ignore:
Timestamp:
Jul 26, 2017, 5:13:20 PM (8 years ago)
Author:
Devin Rousso
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.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r219964 r219972  
     12017-07-26  Devin Rousso  <drousso@apple.com>
     2
     3        Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)')
     4        https://bugs.webkit.org/show_bug.cgi?id=174823
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * UserInterface/Views/CanvasDetailsSidebarPanel.js:
     9        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
     10        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
     11        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):
     12        (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection):
     13        (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow):
     14        Early return if the view has not called initialLayout, as the rows might not have been
     15        constructed yet.
     16
     17        * UserInterface/Views/View.js:
     18        (WebInspector.View.prototype.get didInitialLayout): Added.
     19
    1202017-07-26  Devin Rousso  <drousso@apple.com>
    221
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js

    r219268 r219972  
    144144    _refreshIdentitySection()
    145145    {
    146         if (!this._canvas)
    147             return;
    148 
    149146        this._nameRow.value = this._canvas.displayName;
    150147        this._typeRow.value = WebInspector.Canvas.displayNameForContextType(this._canvas.contextType);
     
    154151    _refreshSourceSection()
    155152    {
    156         if (!this._canvas)
     153        if (!this.didInitialLayout)
    157154            return;
    158155
     
    225222    _refreshAttributesSection()
    226223    {
    227         if (!this._canvas)
    228             return;
    229 
    230224        if (isEmptyObject(this._canvas.contextAttributes)) {
    231225            // Remove the DataGrid to show the placeholder text.
     
    255249    _refreshCSSCanvasSection()
    256250    {
    257         if (!this._canvas)
     251        if (!this.didInitialLayout)
    258252            return;
    259253
     
    280274    _formatMemoryRow()
    281275    {
     276        if (!this.didInitialLayout)
     277            return;
     278
    282279        if (!this._canvas.memoryCost || isNaN(this._canvas.memoryCost)) {
    283280            this._memoryRow.value = emDash;
  • trunk/Source/WebInspectorUI/UserInterface/Views/View.js

    r214439 r219972  
    174174
    175175    get layoutReason() { return this._layoutReason; }
     176    get didInitialLayout() { return this._didInitialLayout; }
    176177
    177178    didMoveToWindow(isAttachedToRoot)
Note: See TracChangeset for help on using the changeset viewer.