Changeset 87772 in webkit


Ignore:
Timestamp:
May 31, 2011 10:09:52 PM (13 years ago)
Author:
kinuko@chromium.org
Message:

2011-05-31 Kinuko Yasuda <kinuko@chromium.org>

Reviewed by Kent Tamura.

[Chromium] webkitStorageInfo methods (for quota API) should not crash when error callback is not given.
https://bugs.webkit.org/show_bug.cgi?id=61823

Added a new test for the fix marked the new test 'skipped' on unsupported platforms.

  • platform/chromium/test_expectations.txt:
  • platform/gtk/Skipped:
  • platform/mac/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:
  • storage/storageinfo-no-callbacks-expected.txt: Added.
  • storage/storageinfo-no-callbacks.html: Added.

2011-05-31 Kinuko Yasuda <kinuko@chromium.org>

Reviewed by Kent Tamura.

[Chromium] webkitStorageInfo methods (for quota API) should not crash when error callback is not given.
https://bugs.webkit.org/show_bug.cgi?id=61823

Fixed assertion on errorCallback parameter.

Test: storage/quotainfo-no-callbacks.html

  • src/StorageInfoChromium.cpp: (WebCore::StorageInfo::queryUsageAndQuota): (WebCore::StorageInfo::requestQuota):
Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87770 r87772  
     12011-05-31  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        [Chromium] webkitStorageInfo methods (for quota API) should not crash when error callback is not given.
     6        https://bugs.webkit.org/show_bug.cgi?id=61823
     7
     8        Added a new test for the fix marked the new test 'skipped' on unsupported platforms.
     9
     10        * platform/chromium/test_expectations.txt:
     11        * platform/gtk/Skipped:
     12        * platform/mac/Skipped:
     13        * platform/qt/Skipped:
     14        * platform/win/Skipped:
     15        * storage/storageinfo-no-callbacks-expected.txt: Added.
     16        * storage/storageinfo-no-callbacks.html: Added.
     17
    1182011-05-31  Hironori Bono  <hbono@chromium.org>
    219
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r87754 r87772  
    201201WONTFIX SKIP MAC WIN : platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle.html = FAIL
    202202
    203 // Quota API is not yet enabled by default.
    204 BUGCR61676 SKIP : storage/storageinfo-query-usage.html = FAIL
    205 BUGCR61676 SKIP : storage/storageinfo-request-quota.html = FAIL
     203// Quota API is not supported in DRT yet.
     204BUGCR84572 SKIP : storage/storageinfo-query-usage.html = FAIL
     205BUGCR84572 SKIP : storage/storageinfo-request-quota.html = FAIL
     206BUGCR84572 SKIP : storage/storageinfo-no-callbacks.html = FAIL
    206207
    207208// Animation API is disabled
  • trunk/LayoutTests/platform/gtk/Skipped

    r87770 r87772  
    339339storage/storageinfo-query-usage.html
    340340storage/storageinfo-request-quota.html
     341storage/storageinfo-no-callbacks.html
    341342
    342343# This platform does not support the Page Visibility API.
  • trunk/LayoutTests/platform/mac/Skipped

    r87705 r87772  
    336336storage/storageinfo-query-usage.html
    337337storage/storageinfo-request-quota.html
     338storage/storageinfo-no-callbacks.html
    338339
    339340# Expose title direction in WebKit API
  • trunk/LayoutTests/platform/qt/Skipped

    r87770 r87772  
    24562456storage/storageinfo-query-usage.html
    24572457storage/storageinfo-request-quota.html
     2458storage/storageinfo-no-callbacks.html
    24582459
    24592460# Expose title direction in WebKit API
  • trunk/LayoutTests/platform/win/Skipped

    r87770 r87772  
    12671267storage/storageinfo-query-usage.html
    12681268storage/storageinfo-request-quota.html
     1269storage/storageinfo-no-callbacks.html
    12691270
    12701271# Expose title direction in WebKit API
  • trunk/Source/WebKit/chromium/ChangeLog

    r87764 r87772  
     12011-05-31  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        [Chromium] webkitStorageInfo methods (for quota API) should not crash when error callback is not given.
     6        https://bugs.webkit.org/show_bug.cgi?id=61823
     7
     8        Fixed assertion on errorCallback parameter.
     9
     10        Test: storage/quotainfo-no-callbacks.html
     11
     12        * src/StorageInfoChromium.cpp:
     13        (WebCore::StorageInfo::queryUsageAndQuota):
     14        (WebCore::StorageInfo::requestQuota):
     15
    1162011-05-31  Daniel Erat  <derat@chromium.org>
    217
  • trunk/Source/WebKit/chromium/src/StorageInfoChromium.cpp

    r86135 r87772  
    5353void fireStorageInfoErrorCallback(PassRefPtr<StorageInfoErrorCallback> errorCallback, ExceptionCode ec)
    5454{
    55     ASSERT(errorCallback);
     55    if (!errorCallback)
     56        return;
    5657    ExceptionCodeDescription description;
    5758    getExceptionCodeDescription(ec, description);
     
    7273        WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
    7374        webFrame->client()->queryStorageUsageAndQuota(webFrame, static_cast<WebStorageQuotaType>(storageType), new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
    74     } else if (errorCallback) {
     75    } else {
    7576        // FIXME: calling this on worker is not yet supported.
    7677        fireStorageInfoErrorCallback(errorCallback, NOT_SUPPORTED_ERR);
     
    9091        WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
    9192        webFrame->client()->requestStorageQuota(webFrame, static_cast<WebStorageQuotaType>(storageType), newQuotaInBytes, new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
    92     } else if (errorCallback) {
     93    } else {
    9394        // FIXME: calling this on worker is not yet supported.
    9495        fireStorageInfoErrorCallback(errorCallback, NOT_SUPPORTED_ERR);
Note: See TracChangeset for help on using the changeset viewer.