Bug 86224

Summary: Web Inspector: exception when switching to heap profiler comparison view
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: alph, apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, tkent, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 86587    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch pfeldman: review+

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>