WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45498
[FileSystem] Do not call EntriesCallback more than once if there're no entries.
https://bugs.webkit.org/show_bug.cgi?id=45498
Summary
[FileSystem] Do not call EntriesCallback more than once if there're no entries.
Kinuko Yasuda
Reported
2010-09-09 15:26:14 PDT
DirectoryReader.readDirectory should not call EntriesCallback twice if there're no entries. Currently it wrongly calls the callback twice (one to return entries that is empty and the other one to indicate there's no more entries.)
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-directoryreader-interface
Attachments
Patch
(2.15 KB, patch)
2010-09-09 15:35 PDT
,
Kinuko Yasuda
dumi
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kinuko Yasuda
Comment 1
2010-09-09 15:35:32 PDT
Created
attachment 67103
[details]
Patch
Dumitru Daniliuc
Comment 2
2010-09-09 23:00:35 PDT
Comment on
attachment 67103
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=67103&action=prettypatch
r=me, but please address the comments before submitting.
> WebCore/fileapi/FileSystemCallbacks.cpp:150 > + if (!hasMore && hadEntries) {
i don't think you need the hadEntries variable. can you just use: if (!hasMore && !m_entries->isEmpty()) and clear m_entries after the if-block?
> WebCore/fileapi/FileSystemCallbacks.cpp:151 > // If there're no more entries, call back once more with an empty array.
update the comment please.
Kinuko Yasuda
Comment 3
2010-09-10 11:44:19 PDT
Committed
r67220
: <
http://trac.webkit.org/changeset/67220
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug