[Webkit-unassigned] [Bug 87578] [FileAPI] The result attribute of FileReader shuold use null to replace empty string
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 29 18:29:09 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=87578
--- Comment #13 from Li Yin <li.yin at intel.com> 2012-05-29 18:29:08 PST ---
> > Source/WebCore/fileapi/FileReader.cpp:248
> > + if (ret.isEmpty())
>
> This would cause NULL being returned when reading an empty file. I think you should change it to:
> if (m_loader && m_loader->stringResult())
> return m_loader->stringResult();
> return String();
>
When the m_loader is Null or the error is occurred, both of them should return null.
So I think the right change shoule be:
if (!m_loader || m_error)
return String();
return m_loader->stringResult;
MeanWhile, the arrayBufferResult should be changed too.
if (!m_loader || m_error)
return 0;
return m_loader->arrayBufferResult();
Thanks for reporting this regression.
--
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