Bug 174823 - Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)')
Summary: Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.v...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL: https://www.apple.com/ipad-pro/
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-25 10:09 PDT by BJ Burg
Modified: 2017-07-27 16:14 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.11 KB, patch)
2017-07-26 15:23 PDT, Devin Rousso
joepeck: review+
Details | Formatted Diff | Diff
Patch (3.85 KB, patch)
2017-07-26 16:35 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-07-25 10:09:06 PDT
-------
Inspected URL:        https://www.apple.com/ipad-pro/
Loading completed:    true
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13) AppleWebKit/605.1.1+ (KHTML, like Gecko)
Dispatch Source:      Protocol Event

Protocol Event:
{"method":"Canvas.canvasMemoryChanged","params":{"canvasId":"canvas:0.6","memoryCost":182400}}

Uncaught Exceptions:
 - undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)') (at CanvasDetailsSidebarPanel.js:287:24)
    _formatMemoryRow @ CanvasDetailsSidebarPanel.js:287:24
    _canvasMemoryChanged @ CanvasDetailsSidebarPanel.js:292:30
    dispatch @ Object.js:170:30
    dispatchEventToListeners @ Object.js:177:17
    memoryCost @ Canvas.js:119:38
    canvasMemoryChanged @ CanvasManager.js:84:15
    canvasMemoryChanged @ CanvasObserver.js:42:55
    dispatchEvent @ InspectorBackend.js:293:42
    _dispatchEvent @ Connection.js:193:32
    dispatch @ Connection.js:71:32
    dispatch @ InspectorBackend.js:152:49
    dispatchNextQueuedMessageFromBackend @ MessageDispatcher.js:42:34

Additional Details:
    cause --> An uncaught exception was thrown while handling event: Canvas.canvasMemoryChanged
-------

* STEPS TO REPRODUCE
1. Turn on canvas feature
2. Go to mentioned website and click around until a canvas shows up
Comment 1 Devin Rousso 2017-07-26 10:29:51 PDT
Do you have any other steps to reproduce this?  I tried what you said and haven't been able to cause the error.
Comment 2 Joseph Pecoraro 2017-07-26 10:58:32 PDT
I think it is possible that this code has been reached before `initialLayout` has created `this._memoryRow`. So we should probably just bail if !this._memoryRow, or expose View's `didInitialLayout` and check that?
Comment 3 Devin Rousso 2017-07-26 15:23:00 PDT
Created attachment 316489 [details]
Patch
Comment 4 Joseph Pecoraro 2017-07-26 16:13:57 PDT
Comment on attachment 316489 [details]
Patch

r=me

Can you also remove the early return in _refreshIdentitySection? It seems unnecessary given its only called in one place after the canvas was already verified.
Comment 5 Devin Rousso 2017-07-26 16:35:22 PDT
Created attachment 316497 [details]
Patch
Comment 6 WebKit Commit Bot 2017-07-26 17:13:24 PDT
Comment on attachment 316497 [details]
Patch

Clearing flags on attachment: 316497

Committed r219972: <http://trac.webkit.org/changeset/219972>
Comment 7 WebKit Commit Bot 2017-07-26 17:13:25 PDT
All reviewed patches have been landed.  Closing bug.