Bug 97890 - Web Inspector: Profiles: taking heap snapshot causes error message in console.
Summary: Web Inspector: Profiles: taking heap snapshot causes error message in console.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: eustas.bug
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 04:23 PDT by eustas.bug
Modified: 2012-10-03 02:49 PDT (History)
13 users (show)

See Also:


Attachments
Patch (9.39 KB, patch)
2012-09-28 04:30 PDT, eustas.bug
no flags Details | Formatted Diff | Diff
Patch (10.18 KB, patch)
2012-09-28 05:03 PDT, eustas.bug
no flags Details | Formatted Diff | Diff
Patch (10.16 KB, patch)
2012-10-01 07:22 PDT, eustas.bug
no flags Details | Formatted Diff | Diff
Patch (10.15 KB, patch)
2012-10-01 23:42 PDT, eustas.bug
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description eustas.bug 2012-09-28 04:23:28 PDT
Actual problem is that proxy loader is closed twice.

"_snapshotReceived" should never try to close receiver,
because it is a callback fired by close.

Also minor glitches fixed:
 - taking snapshot shows "Loading..." status first,
and then "Saving xxx%";
 - after all chunks are sent "Parsing" status is set and
then is replaced with "Saving 100%";
 - "Loading %d\%" is not localized.
Comment 1 eustas.bug 2012-09-28 04:30:29 PDT
Created attachment 166206 [details]
Patch
Comment 2 Andrey Kosyakov 2012-09-28 04:41:39 PDT
Comment on attachment 166206 [details]
Patch

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

> Source/WebCore/inspector/front-end/HeapSnapshotView.js:898
> +        var status = this._savingToFile ? "Saving\u2026 %d\%" : "Loading\u2026 %d\%";

We prefer localizeble string literals always to be within UIString(), even if it may be a bit more code.
Also, now that this handles both saving and loading, I think the method could be renamed to something more generic.

> Source/WebCore/inspector/front-end/HeapSnapshotView.js:903
> +    _updateSnapshotStatus: function() {

style: { => next line

> Source/WebCore/inspector/front-end/HeapSnapshotView.js:1022
> +            "Loading\u2026 %d\%", (source.loadedSize() * 100 / source.fileSize()).toFixed(2));

Can we reuse saveStatusUpdate() here?
Comment 3 eustas.bug 2012-09-28 05:02:21 PDT
Comment on attachment 166206 [details]
Patch

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

>> Source/WebCore/inspector/front-end/HeapSnapshotView.js:898
>> +        var status = this._savingToFile ? "Saving\u2026 %d\%" : "Loading\u2026 %d\%";
> 
> We prefer localizeble string literals always to be within UIString(), even if it may be a bit more code.
> Also, now that this handles both saving and loading, I think the method could be renamed to something more generic.

Done.

>> Source/WebCore/inspector/front-end/HeapSnapshotView.js:903
>> +    _updateSnapshotStatus: function() {
> 
> style: { => next line

Fixed

>> Source/WebCore/inspector/front-end/HeapSnapshotView.js:1022
>> +            "Loading\u2026 %d\%", (source.loadedSize() * 100 / source.fileSize()).toFixed(2));
> 
> Can we reuse saveStatusUpdate() here?

Done.
Comment 4 eustas.bug 2012-09-28 05:03:45 PDT
Created attachment 166215 [details]
Patch
Comment 5 eustas.bug 2012-10-01 07:22:35 PDT
Created attachment 166473 [details]
Patch

rebased
Comment 6 Yury Semikhatsky 2012-10-01 22:30:08 PDT
Comment on attachment 166473 [details]
Patch

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

> Source/WebCore/ChangeLog:18
> +         - removed edad code in proxy;

typo: edad -> dead

> Source/WebCore/inspector/front-end/HeapSnapshotView.js:967
> +            this._updateTransferProgress(0, 0);

Should it be (0, this._totalNumberOfChunks) ?
Comment 7 eustas.bug 2012-10-01 23:33:34 PDT
Comment on attachment 166473 [details]
Patch

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

>> Source/WebCore/ChangeLog:18
>> +         - removed edad code in proxy;
> 
> typo: edad -> dead

oops. fixed

>> Source/WebCore/inspector/front-end/HeapSnapshotView.js:967
>> +            this._updateTransferProgress(0, 0);
> 
> Should it be (0, this._totalNumberOfChunks) ?

Sure.
Comment 8 eustas.bug 2012-10-01 23:42:04 PDT
Created attachment 166618 [details]
Patch
Comment 9 WebKit Review Bot 2012-10-03 02:49:55 PDT
Comment on attachment 166618 [details]
Patch

Clearing flags on attachment: 166618

Committed r130269: <http://trac.webkit.org/changeset/130269>
Comment 10 WebKit Review Bot 2012-10-03 02:49:59 PDT
All reviewed patches have been landed.  Closing bug.