Bug 93933 - Web Inspector: Completion events of InspectorFileSystemAgent should be fired asynchronously.
Summary: Web Inspector: Completion events of InspectorFileSystemAgent should be fired ...
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: Taiju Tsuiki
URL:
Keywords:
Depends on: 93930
Blocks: 68203 91831
  Show dependency treegraph
 
Reported: 2012-08-13 22:44 PDT by Taiju Tsuiki
Modified: 2012-08-21 15:29 PDT (History)
11 users (show)

See Also:


Attachments
Patch (16.09 KB, patch)
2012-08-13 23:18 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (16.67 KB, patch)
2012-08-17 00:46 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Taiju Tsuiki 2012-08-13 22:44:14 PDT
Some completion events of InspectorFileSystemAgent commands are fired too early on error case.
We should wait the command passes its request ID to JS.
Comment 1 Taiju Tsuiki 2012-08-13 23:18:32 PDT
Created attachment 158228 [details]
Patch
Comment 2 Taiju Tsuiki 2012-08-16 01:25:53 PDT
Let me add explanation for this patch.
In short, we shouldn't call Frontend::directoryContentReceived in Agent::requestDirectoryContent.

For example, the process flow of requestDirectoryContent is as follows:
1. front-end calls Agent::requestDirectoryContent,
2. Agent kicks DirectoryContentRequest task,
3. Agent returns requestId to front-end through requestAccepted,
4. front-end associates requestId with callback,
5. Agent fires directoryContentReceived event with requestId.
6. front-end fires the callback according to requestId.

That is, requestId is not associated with callback at 2.,
so if we fire directoryContentReceived in 2. before Agent::requestDirectoryContent returns,
front-end can't find which callback should be called.
Comment 3 Taiju Tsuiki 2012-08-16 01:29:16 PDT
To be more concrete, if front-end calls requestDirectoryContent with invalid URL, directoryContentReceived will be fired before requestAccepted.
Comment 4 Taiju Tsuiki 2012-08-17 00:46:41 PDT
Created attachment 159029 [details]
Patch
Comment 5 WebKit Review Bot 2012-08-21 15:29:05 PDT
Comment on attachment 159029 [details]
Patch

Clearing flags on attachment: 159029

Committed r126195: <http://trac.webkit.org/changeset/126195>
Comment 6 WebKit Review Bot 2012-08-21 15:29:10 PDT
All reviewed patches have been landed.  Closing bug.