Bug 90592

Summary: Web Inspector: Clean up FileSystem related code
Product: WebKit Reporter: Taiju Tsuiki <tzik>
Component: Web Inspector (Deprecated)Assignee: Taiju Tsuiki <tzik>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, kinuko, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 312.x   
Hardware: All   
OS: All   
Bug Depends on: 90439, 90518, 90529    
Bug Blocks: 68203    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch vsevik: review+, webkit.review.bot: commit-queue-

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>