Bug 86224 - Web Inspector: exception when switching to heap profiler comparison view
Summary: Web Inspector: exception when switching to heap profiler comparison view
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: Yury Semikhatsky
URL:
Keywords:
Depends on: 86587
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-11 09:53 PDT by Yury Semikhatsky
Modified: 2012-05-16 02:25 PDT (History)
13 users (show)

See Also:


Attachments
Patch (3.41 KB, patch)
2012-05-15 00:57 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (3.39 KB, patch)
2012-05-15 02:10 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (3.58 KB, patch)
2012-05-16 02:13 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-05-11 09:53:31 PDT
1. Switch to using fake worker for heap snapshot processing.
2. Take two snapshots.
3. Reopen front-end.
4. Select second snapshot and switch to the comparison view.

Result:

An error happened when a call for method 'finishLoading' was requested
Error: Invalid toNodeIndex 1
    at Object._buildRetainers (chrome-devtools://devtools/HeapSnapshot.js:765:27)
    at Object._init (chrome-devtools://devtools/HeapSnapshot.js:717:14)
    at Object.<anonymous> (chrome-devtools://devtools/HeapSnapshot.js:640:10)
    at Object.finishLoading (chrome-devtools://devtools/HeapSnapshotLoader.js:64:22)
    at Object.dispatchMessage (chrome-devtools://devtools/HeapSnapshotWorkerDispatcher.js:74:58)
    at Object.dispatch (chrome-devtools://devtools/HeapSnapshotProxy.js:94:34)
Comment 1 Alexei Filippov 2012-05-14 06:19:16 PDT
Fake worker uses setTimeout(..., 0) to post/dispatch messages. setTimeout may reorder messages which leads to the serialized snapshot chunks get intermixed.
Comment 2 Yury Semikhatsky 2012-05-15 00:57:46 PDT
Created attachment 141881 [details]
Patch
Comment 3 Ilya Tikhonovsky 2012-05-15 00:59:39 PDT
lgtm
Comment 4 Yury Semikhatsky 2012-05-15 02:10:48 PDT
Created attachment 141895 [details]
Patch
Comment 5 Yury Semikhatsky 2012-05-15 04:09:42 PDT
Committed r117050: <http://trac.webkit.org/changeset/117050>
Comment 7 WebKit Review Bot 2012-05-16 00:28:40 PDT
Re-opened since this is blocked by 86587
Comment 8 Yury Semikhatsky 2012-05-16 02:13:57 PDT
Created attachment 142200 [details]
Patch
Comment 9 Yury Semikhatsky 2012-05-16 02:15:33 PDT
(In reply to comment #8)
> Created an attachment (id=142200) [details]
> Patch

This patch adds task queue that will execute all scheduled tasks on next timeout. This fixes the timing out profiler tests.
Comment 10 Yury Semikhatsky 2012-05-16 02:25:39 PDT
Committed r117241: <http://trac.webkit.org/changeset/117241>