⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 140442 in webkit


Ignore:
Timestamp:
Jan 22, 2013, 11:13:58 AM (14 years ago)
Author:
jer.noble@apple.com
Message:

REGRESSION(r140344): Repeated crashes in WKTR PlatformWebView::viewSupportsOptions().
https://bugs.webkit.org/show_bug.cgi?id=107562

Rubber-stamped by Alexy Proskuryakov.

The input to WKBooleanGetValue() is not NULL-safe, so NULL check its inputs before calling.

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r140434 r140442  
     12013-01-22  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION(r140344): Repeated crashes in WKTR PlatformWebView::viewSupportsOptions().
     4        https://bugs.webkit.org/show_bug.cgi?id=107562
     5
     6        Rubber-stamped by Alexy Proskuryakov.
     7
     8        The input to WKBooleanGetValue() is not NULL-safe, so NULL check its inputs before calling.
     9
     10        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
     11        (WTR::PlatformWebView::PlatformWebView):
     12        (WTR::PlatformWebView::viewSupportsOptions):
     13
    1142013-01-22  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm

    r140189 r140442  
    110110{
    111111    WKRetainPtr<WKStringRef> useTiledDrawingKey(AdoptWK, WKStringCreateWithUTF8CString("TiledDrawing"));
    112     bool useTiledDrawing = options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useTiledDrawingKey.get()))) : false;
     112    WKTypeRef useTiledDrawingValue = options ? WKDictionaryGetItemForKey(options, useTiledDrawingKey.get()) : NULL;
     113    bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue));
    113114
    114115    NSRect rect = NSMakeRect(0, 0, 800, 600);
     
    203204{
    204205    WKRetainPtr<WKStringRef> useTiledDrawingKey(AdoptWK, WKStringCreateWithUTF8CString("TiledDrawing"));
    205     bool useTiledDrawing = WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useTiledDrawingKey.get())));
     206    WKTypeRef useTiledDrawingValue = WKDictionaryGetItemForKey(options, useTiledDrawingKey.get());
     207    bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue));
    206208
    207209    return useTiledDrawing == [(TestRunnerWKView *)m_view useTiledDrawing];
Note: See TracChangeset for help on using the changeset viewer.