[Webkit-unassigned] [Bug 37218] Implement FileStreamProxy that calls FileStream methods on FileThread for FileAPI
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 7 18:14:05 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=37218
--- Comment #6 from Kinuko Yasuda <kinuko at chromium.org> 2010-04-07 18:14:04 PST ---
(In reply to comment #4)
> (From update of attachment 52761 [details])
> > --- /dev/null
> > +++ b/WebCore/html/FileStreamProxy.cpp
> > +#include "FileThread.h"
> > +#include "FileThreadTask.h"
> This include should be placed above so that it will be in the alphabetical
> order.
The order is enforced by check-webkit-style, so I assume the current order is
ok.
> > FileStreamProxy::~FileStreamProxy()
> > {
> > if (fileThread())
> > fileThread()->unscheduleTasks(m_stream.get());
> Is it possible that m_context is destructed before FileStreamProxy instance?
I fixed some refs/destructor issues. The new code assumes the object that
holds a reference to FileStreamProxy calls FileStreamProxy::stop() in its
destructor to safely shutdown the context/thread.
> > +void FileStreamProxy::write(Blob* blob, long long position, size_t length)
> We should use either size_t or int for length in read() and write(), for
> consistency.
Changed size_t to int.
> > +FileThread* FileStreamProxy::fileThread()
> > +{
> > + ASSERT(m_context->fileThread()); // FIXME
> What is this FIXME about?
If thread creation fails it will cause SEGV... but currently I have no idea to
'fix' it, so I removed the comment.
> > +static void notifyWriteOnContext(ScriptExecutionContext* context, FileStreamProxy* stream, int nwritten)
> Better to name it as bytesWritten.
Done.
--
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