[Webkit-unassigned] [Bug 37218] Implement FileStreamProxy that calls FileStream methods on FileThread for FileAPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 9 12:10:20 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37218


Jian Li <jianli at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #52921|review?                     |review-
               Flag|                            |




--- Comment #13 from Jian Li <jianli at chromium.org>  2010-04-09 12:10:19 PST ---
(From update of attachment 52921)
I think the way to fix "new file mode..." problem in the patch is to create a
new file
from the scratch and then copy and paste the content over. You need to revert
all new
files just added and then create files and add them to the repository.

> diff --git a/WebCore/html/FileStreamProxy.cpp b/WebCore/html/FileStreamProxy.cpp
> +FileStreamProxy::FileStreamProxy(ScriptExecutionContext* context, FileStreamClient* client)
> +    : m_context(context)
> +    , m_client(client)
> +    , m_stream(FileStream::create(this))
> +{
> +    ref();
Could you please add the comment about why we need to keep its own ref here?

> +void FileStreamProxy::abort()
> +{
> +    fileThread()->unscheduleTasks(m_stream.get());
> +}
> +
> +void FileStreamProxy::stop()
> +{
> +    fileThread()->unscheduleTasks(m_stream.get());
> +    fileThread()->postTask(createFileThreadTask(m_stream.get(), &FileStream::stop));
> +}
I still think we do not need both abort() and stop(). Since we are not going to
resume
after abort, can we simply call stop() from FileReader/FieWriter::abort()?

> diff --git a/WebCore/html/FileStreamProxy.h b/WebCore/html/FileStreamProxy.h
> +class FileStreamProxy : public RefCounted<FileStreamProxy>, public FileStreamClient {
> +protected:
If we're not going to have other child classes derived from FileStreamProxy,
it would be better to make it "private".

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list