Changeset 87758 in webkit


Ignore:
Timestamp:
May 31, 2011 3:40:17 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-31 Berend-Jan Wever <skylined@chromium.org>

Reviewed by Adam Barth.

Add test to make sure an error in requestFileSystem or resolveLocalFileSystemURI
when no error callback is supplied does not cause a NULL ptr.
https://bugs.webkit.org/show_bug.cgi?id=49539

  • fast/filesystem/filesystem-no-callback-null-ptr-crash.html: Added.
  • fast/filesystem/filesystem-no-callback-null-ptr-crash-expected.txt: Added.

2011-05-31 B.J. Wever <skylined@chromium.org>

Reviewed by Adam Barth.

requestFileSystem and resolveLocalFileSystemURI are not checking if
errorCallback is NULL before scheduling a callback on error.
https://bugs.webkit.org/show_bug.cgi?id=49539

Test: fast/filesystem/filesystem-no-callback-null-ptr-crash.html

  • fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::scheduleCallback): Only call callback if one is supplied.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87754 r87758  
     12011-05-31  Berend-Jan Wever  <skylined@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Add test to make sure an error in requestFileSystem or resolveLocalFileSystemURI
     6        when no error callback is supplied does not cause a NULL ptr.
     7        https://bugs.webkit.org/show_bug.cgi?id=49539
     8
     9        * fast/filesystem/filesystem-no-callback-null-ptr-crash.html: Added.
     10        * fast/filesystem/filesystem-no-callback-null-ptr-crash-expected.txt: Added.
     11
    1122011-05-31  Hao Zheng  <zhenghao@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r87756 r87758  
     12011-05-31  B.J. Wever  <skylined@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        requestFileSystem and resolveLocalFileSystemURI are not checking if
     6        errorCallback is NULL before scheduling a callback on error.
     7        https://bugs.webkit.org/show_bug.cgi?id=49539
     8
     9        Test: fast/filesystem/filesystem-no-callback-null-ptr-crash.html
     10
     11        * fileapi/DOMFileSystem.cpp:
     12        (WebCore::DOMFileSystem::scheduleCallback): Only call callback if
     13          one is supplied.
     14
    1152011-05-31  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebCore/fileapi/DOMFileSystem.h

    r86067 r87758  
    102102{
    103103    ASSERT(scriptExecutionContext->isContextThread());
    104     ASSERT(callback);
    105     scriptExecutionContext->postTask(adoptPtr(new DispatchCallbackTask<CB, CBArg>(callback, arg)));
     104    if (callback)
     105        scriptExecutionContext->postTask(adoptPtr(new DispatchCallbackTask<CB, CBArg>(callback, arg)));
    106106}
    107107
Note: See TracChangeset for help on using the changeset viewer.