Bug 87702 - Add readDirectory command and didReadDirectory event to InspectorFileSystemAgent
Summary: Add readDirectory command and didReadDirectory event to InspectorFileSystemAgent
Status: RESOLVED DUPLICATE of bug 87724
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:
Blocks: 87724
  Show dependency treegraph
 
Reported: 2012-05-28 23:50 PDT by Taiju Tsuiki
Modified: 2012-06-14 00:33 PDT (History)
10 users (show)

See Also:


Attachments
Patch (5.14 KB, patch)
2012-05-28 23:57 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (5.23 KB, patch)
2012-05-29 01:35 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (5.64 KB, patch)
2012-05-29 01:42 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-05-28 23:50:17 PDT
This patch adds readDirectory command and didReadDirectory event to FileSystem domain
 and adds mock implementation of readDirectory.
Inspector needs them for FileSystem support.
Comment 1 Taiju Tsuiki 2012-05-28 23:57:22 PDT
Created attachment 144461 [details]
Patch
Comment 2 Yury Semikhatsky 2012-05-29 00:50:46 PDT
Comment on attachment 144461 [details]
Patch

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

> Source/WebCore/inspector/Inspector.json:1420
> +                    { "name": "errorCode", "type": "integer" },

Please add a description for this and the next fields.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:80
> +    m_frontend->didReadDirectory(requestId, static_cast<int>(FileError::ABORT_ERR), TypeBuilder::Array<String>::create());

You may want to make the "entries" field optional as it makes no sense in case of an error.
Comment 3 Kinuko Yasuda 2012-05-29 01:05:26 PDT
Comment on attachment 144461 [details]
Patch

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

Drive-by nit-picks.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:2
> + * Copyright (C) 2012 Google Inc. All rights reserved.

In general we seem to just append copyright years in WebKit (rather than replacing)

> Source/WebCore/inspector/InspectorFileSystemAgent.h:2
> + * Copyright (C) 2012 Google Inc. All rights reserved.

ditto.

> Source/WebCore/inspector/InspectorFileSystemAgent.h:49
> +typedef String ErrorString;

nit: why do we suddenly need this typedef? (We seem to be already using it)
Comment 4 Taiju Tsuiki 2012-05-29 01:35:20 PDT
Created attachment 144474 [details]
Patch
Comment 5 Taiju Tsuiki 2012-05-29 01:42:32 PDT
Created attachment 144476 [details]
Patch
Comment 6 Yury Semikhatsky 2012-05-29 01:43:17 PDT
Comment on attachment 144474 [details]
Patch

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

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:2
> + * Copyright (C) 2011,2012 Google Inc. All rights reserved.

nit: space after ,

> Source/WebCore/inspector/InspectorFileSystemAgent.h:2
> + * Copyright (C) 2011,2012 Google Inc. All rights reserved.

nit: space after ,

> Source/WebCore/inspector/InspectorFileSystemAgent.h:49
> +typedef String ErrorString;

No need for this as it is defined in InspectorBackendDispatcher.h
Comment 7 Taiju Tsuiki 2012-05-29 01:43:51 PDT
Comment on attachment 144461 [details]
Patch

Thanks! Updated.

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

>> Source/WebCore/inspector/Inspector.json:1420
>> +                    { "name": "errorCode", "type": "integer" },
> 
> Please add a description for this and the next fields.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:2
>> + * Copyright (C) 2012 Google Inc. All rights reserved.
> 
> In general we seem to just append copyright years in WebKit (rather than replacing)

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:80
>> +    m_frontend->didReadDirectory(requestId, static_cast<int>(FileError::ABORT_ERR), TypeBuilder::Array<String>::create());
> 
> You may want to make the "entries" field optional as it makes no sense in case of an error.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.h:2
>> + * Copyright (C) 2012 Google Inc. All rights reserved.
> 
> ditto.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.h:49
>> +typedef String ErrorString;
> 
> nit: why do we suddenly need this typedef? (We seem to be already using it)

It is also in InspectorFrontend.h (generated header). But I'd like to define it explicitly.
Comment 8 Yury Semikhatsky 2012-05-29 01:44:40 PDT
Comment on attachment 144476 [details]
Patch

Please address my comments to the previous patch.
Comment 9 Taiju Tsuiki 2012-06-14 00:33:54 PDT

*** This bug has been marked as a duplicate of bug 87724 ***