Bug 89455 - Web Inspector: exception in console when showing popover for a big array
Summary: Web Inspector: exception in console when showing popover for a big array
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-19 03:32 PDT by Yury Semikhatsky
Modified: 2014-12-13 15:43 PST (History)
10 users (show)

See Also:


Attachments
Example script (65 bytes, text/html)
2012-06-19 03:32 PDT, Yury Semikhatsky
no flags Details
Patch (3.62 KB, patch)
2012-06-19 07:12 PDT, Yury Semikhatsky
pfeldman: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2012-06-19 03:32:48 PDT
Created attachment 148303 [details]
Example script

Steps to reproduce:

1. Open attached page.
2. Take a heap snapshot.
3. Find Int32Array in the heap snapshot summary view.
4. Hover over the element until object popover appears.
5. Make the popover disappear.

Result:
Exception in the console:
[5258:5258:1639589149962:ERROR:CONSOLE(656)] "Uncaught TypeError: Cannot call method 'getOwnProperties' of null", source: chrome-devtools://devtools/ObjectPropertiesSection.js (656)
Comment 1 Yury Semikhatsky 2012-06-19 07:12:48 PDT
Created attachment 148327 [details]
Patch
Comment 2 Pavel Feldman 2012-06-19 07:23:55 PDT
Comment on attachment 148327 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148327&action=review

Adding a test would be great.

> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:614
> +            arrayFragment.getAllProperties(processProperties.bind(this));

When does this happen? The method above should either return proper value or not be called. Could you provide a test case?
Comment 3 Yury Semikhatsky 2012-06-19 07:45:10 PDT
Comment on attachment 148327 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148327&action=review

>> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:614
>> +            arrayFragment.getAllProperties(processProperties.bind(this));
> 
> When does this happen? The method above should either return proper value or not be called. Could you provide a test case?

It happens on very big arrays(100 000 000 elements, see attached test case) for which the request takes long enough time for the user to close the popover.
Comment 4 Pavel Feldman 2012-06-19 08:42:19 PDT
Comment on attachment 148327 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148327&action=review

>>> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:614
>>> +            arrayFragment.getAllProperties(processProperties.bind(this));
>> 
>> When does this happen? The method above should either return proper value or not be called. Could you provide a test case?
> 
> It happens on very big arrays(100 000 000 elements, see attached test case) for which the request takes long enough time for the user to close the popover.

Should we test whether tree outline element is still attached here instead?
Comment 5 Yury Semikhatsky 2012-06-19 09:27:14 PDT
(In reply to comment #4)
> (From update of attachment 148327 [details])
> > It happens on very big arrays(100 000 000 elements, see attached test case) for which the request takes long enough time for the user to close the popover.
> 
> Should we test whether tree outline element is still attached here instead?

How can we do this given that we don't know its owner?
Comment 6 Pavel Feldman 2012-06-19 09:29:17 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 148327 [details] [details])
> > > It happens on very big arrays(100 000 000 elements, see attached test case) for which the request takes long enough time for the user to close the popover.
> > 
> > Should we test whether tree outline element is still attached here instead?
> 
> How can we do this given that we don't know its owner?

treeElement ?
Comment 7 Yury Semikhatsky 2012-06-19 23:34:18 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (From update of attachment 148327 [details] [details] [details])
> > > > It happens on very big arrays(100 000 000 elements, see attached test case) for which the request takes long enough time for the user to close the popover.
> > > 
> > > Should we test whether tree outline element is still attached here instead?
> > 
> > How can we do this given that we don't know its owner?
> 
> treeElement ?

When popover closes its tree elements stay in the TreeOutline. Do you suggest we should check treeElement.element's 'display' property or what? Could you elaborate on this. Neither WebInspector.Section nor TreeOutline are views so we cannot use View.isShowing for this check either.