Bug 90592 - Web Inspector: Clean up FileSystem related code
Summary: Web Inspector: Clean up FileSystem related code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 312.x
Hardware: All All
: P2 Normal
Assignee: Taiju Tsuiki
URL:
Keywords:
Depends on: 90439 90518 90529
Blocks: 68203
  Show dependency treegraph
 
Reported: 2012-07-05 01:44 PDT by Taiju Tsuiki
Modified: 2012-07-11 02:05 PDT (History)
12 users (show)

See Also:


Attachments
Patch (53.05 KB, patch)
2012-07-05 01:50 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (53.40 KB, patch)
2012-07-10 22:36 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (54.30 KB, patch)
2012-07-10 22:45 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (54.24 KB, patch)
2012-07-10 23:18 PDT, Taiju Tsuiki
vsevik: review+
webkit.review.bot: commit-queue-
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-07-05 01:44:03 PDT
FileSystem related code in Inspector needs some clean up as follows
- Clean up layout tests and add test case for error case,
- Fix error handling on request,
- s/GetFileSystemRootTask/FileSystemRootRequest/g
- s/ReadDirectoryTask/DirectoryContentRequest/g
- s/ReadFileTask/FileContentRequest/g
Comment 1 Taiju Tsuiki 2012-07-05 01:50:51 PDT
Created attachment 150892 [details]
Patch
Comment 2 Vsevolod Vlasov 2012-07-07 01:07:58 PDT
Comment on attachment 150892 [details]
Patch

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

Please rebase and fix style nits before landing.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:195
> +    RefPtr<TypeBuilder::FileSystem::Entry> result =

RefPtr<TypeBuilder::FileSystem::Entry> result = TypeBuilder::FileSystem::Entry::create()
    .setUrl(entry->toURL())
    .setName("/")
    .setIsDirectory(true);

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:303
> +        RefPtr<TypeBuilder::FileSystem::Entry> entryForFrontend =

Ditto.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:407
> +    RefPtr<Metadata> result =

Ditto.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:594
> +        *error = "No frame is available for the request";

You can avoid copy-pasting this string several times by extracting assertScriptExecutionContextForOrigin method (like assertDocumentLoader in InspectorPageAgent).

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:664
> +    long long startLL = start ? *start : 0;

startPosition
Comment 3 Taiju Tsuiki 2012-07-10 22:36:22 PDT
Created attachment 151600 [details]
Patch
Comment 4 Taiju Tsuiki 2012-07-10 22:45:28 PDT
Created attachment 151602 [details]
Patch
Comment 5 Taiju Tsuiki 2012-07-10 23:18:33 PDT
Created attachment 151608 [details]
Patch
Comment 6 Taiju Tsuiki 2012-07-10 23:19:00 PDT
Comment on attachment 150892 [details]
Patch

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

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:195
>> +    RefPtr<TypeBuilder::FileSystem::Entry> result =
> 
> RefPtr<TypeBuilder::FileSystem::Entry> result = TypeBuilder::FileSystem::Entry::create()
>     .setUrl(entry->toURL())
>     .setName("/")
>     .setIsDirectory(true);

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:303
>> +        RefPtr<TypeBuilder::FileSystem::Entry> entryForFrontend =
> 
> Ditto.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:407
>> +    RefPtr<Metadata> result =
> 
> Ditto.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:594
>> +        *error = "No frame is available for the request";
> 
> You can avoid copy-pasting this string several times by extracting assertScriptExecutionContextForOrigin method (like assertDocumentLoader in InspectorPageAgent).

Sounds nice. Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:664
>> +    long long startLL = start ? *start : 0;
> 
> startPosition

Done
Comment 7 WebKit Review Bot 2012-07-11 00:22:26 PDT
Comment on attachment 151608 [details]
Patch

Rejecting attachment 151608 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
t/git/webkit-commit-queue/Source/WebKit/chromium/v8 --revision 11988 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
47>At revision 11988.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/13200229
Comment 8 Kinuko Yasuda 2012-07-11 02:05:00 PDT
Committed r122313: <http://trac.webkit.org/changeset/122313>