Bug 82194

Summary: Web Inspector: Some user objects are missing in dominators view
Product: WebKit Reporter: Alexei Filippov <alph>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Alexei Filippov 2012-03-26 05:44:26 PDT
It is not possible to hide internal objects in dominators tree view because these objects may happen to contain other user objects that should not be hidden.
Comment 1 Alexei Filippov 2012-03-26 05:48:13 PDT
Created attachment 133785 [details]
Patch
Comment 2 Yury Semikhatsky 2012-03-26 06:30:54 PDT
Comment on attachment 133785 [details]
Patch

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

> Source/WebCore/inspector/front-end/HeapSnapshot.js:234
> +        return this._snapshot[this._arrayName].subarray(this._start + start, this._start + end);

Why did this change? Is it a bug?
Comment 3 Alexei Filippov 2012-03-26 06:41:38 PDT
Comment on attachment 133785 [details]
Patch

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

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:234
>> +        return this._snapshot[this._arrayName].subarray(this._start + start, this._start + end);
> 
> Why did this change? Is it a bug?

Yep, it is not related to the main change. I just noticed it and decided to fix.
end should be relative to this._start when it is passed in,
and it should be the end of the outer slice (i.e. this._start + this.length) when it is not.
Comment 4 Yury Semikhatsky 2012-03-26 06:43:55 PDT
(In reply to comment #3)
> (From update of attachment 133785 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=133785&action=review
> 
> >> Source/WebCore/inspector/front-end/HeapSnapshot.js:234
> >> +        return this._snapshot[this._arrayName].subarray(this._start + start, this._start + end);
> > 
> > Why did this change? Is it a bug?
> 
> Yep, it is not related to the main change. I just noticed it and decided to fix.
> end should be relative to this._start when it is passed in,
> and it should be the end of the outer slice (i.e. this._start + this.length) when it is not.

Does it break anything? If so, can we cover it with a test?
Comment 5 Alexei Filippov 2012-03-26 09:37:12 PDT
Created attachment 133834 [details]
Patch
Comment 6 Alexei Filippov 2012-03-26 09:39:21 PDT
It seems to be always called with slice(0, undef) parameters. For this exact parameters set it works as expected. Added a test for other cases.
Comment 7 Yury Semikhatsky 2012-03-27 07:23:34 PDT
Comment on attachment 133834 [details]
Patch

Clearing flags on attachment: 133834

Committed r112262: <http://trac.webkit.org/changeset/112262>
Comment 8 Yury Semikhatsky 2012-03-27 07:23:41 PDT
All reviewed patches have been landed.  Closing bug.