Changeset 49806 in webkit


Ignore:
Timestamp:
Oct 19, 2009 1:30:27 PM (15 years ago)
Author:
mitz@apple.com
Message:

Split assertions of conjunctions into separate statements or remove
redundant assertions.

Reviewed by Anders Carlsson.

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):

  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
(-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):

  • Plugins/WebBaseNetscapePluginView.mm:

(-[WebBaseNetscapePluginView halt]):
(-[WebBaseNetscapePluginView resumeFromHalt]):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
(-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):

  • WebCoreSupport/WebContextMenuClient.mm:

(WebContextMenuClient::getCustomMenuFromDefaultItems):

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::checkGrammarOfString):
(WebEditorClient::checkTextOfParagraph):

  • WebView/WebTextCompletionController.mm:

(-[WebTextCompletionController _reflectSelection]):

Location:
trunk/WebKit/mac
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r49763 r49806  
     12009-10-19  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Split assertions of conjunctions into separate statements or remove
     6        redundant assertions.
     7
     8        * Plugins/Hosted/NetscapePluginHostProxy.mm:
     9        (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
     10        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
     11        (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
     12        (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
     13        * Plugins/WebBaseNetscapePluginView.mm:
     14        (-[WebBaseNetscapePluginView halt]):
     15        (-[WebBaseNetscapePluginView resumeFromHalt]):
     16        * Plugins/WebNetscapePluginView.mm:
     17        (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
     18        (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
     19        * WebCoreSupport/WebContextMenuClient.mm:
     20        (WebContextMenuClient::getCustomMenuFromDefaultItems):
     21        * WebCoreSupport/WebEditorClient.mm:
     22        (WebEditorClient::checkGrammarOfString):
     23        (WebEditorClient::checkTextOfParagraph):
     24        * WebView/WebTextCompletionController.mm:
     25        (-[WebTextCompletionController _reflectSelection]):
     26
    1272009-10-18  Mark Rowe  <mrowe@apple.com>
    228
  • trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm

    r45678 r49806  
    188188void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
    189189{
    190     ASSERT(msg && static_cast<mach_msg_header_t*>(msg)->msgh_id == MACH_NOTIFY_DEAD_NAME);
     190    ASSERT(msg);
     191    ASSERT(static_cast<mach_msg_header_t*>(msg)->msgh_id == MACH_NOTIFY_DEAD_NAME);
    191192   
    192193    static_cast<NetscapePluginHostProxy*>(info)->pluginHostDied();
  • trunk/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm

    r49512 r49806  
    9191- (void)setAttributeKeys:(NSArray *)keys andValues:(NSArray *)values
    9292{
    93     ASSERT(!_attributeKeys && !_attributeValues);
     93    ASSERT(!_attributeKeys);
     94    ASSERT(!_attributeValues);
    9495   
    9596    _attributeKeys.adoptNS([keys copy]);
     
    422423   
    423424    id contextInfo = [webPluginContainerCheck contextInfo];
    424     ASSERT(contextInfo && [contextInfo isKindOfClass:[NSNumber class]]);
     425    ASSERT([contextInfo isKindOfClass:[NSNumber class]]);
    425426
    426427    if (!_proxy)
  • trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm

    r49733 r49806  
    479479- (void)halt
    480480{
    481     ASSERT(!_isHalted && _isStarted);
     481    ASSERT(!_isHalted);
     482    ASSERT(_isStarted);
    482483    Element *element = [self element];
    483484#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
     
    500501- (void)resumeFromHalt
    501502{
    502     ASSERT(_isHalted && !_isStarted);
     503    ASSERT(_isHalted);
     504    ASSERT(!_isStarted);
    503505    [self start];
    504506   
  • trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm

    r49512 r49806  
    403403                        getQDPixelFormatForBitmapContext(currentContext), &offscreenBounds, 0, 0, 0,
    404404                        static_cast<char*>(offscreenData), CGBitmapContextGetBytesPerRow(currentContext));
    405                     ASSERT(newOffscreenGWorld && !err);
     405                    ASSERT(newOffscreenGWorld)
     406                    ASSERT(!err);
    406407                    if (!err) {
    407408                        if (offscreenGWorld)
     
    12871288    ASSERT([webPluginContainerCheck isKindOfClass:[WebPluginContainerCheck class]]);
    12881289    WebPluginContainerCheck *check = (WebPluginContainerCheck *)webPluginContainerCheck;
    1289     ASSERT([check contextInfo] && [[check contextInfo] isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
     1290    ASSERT([[check contextInfo] isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
    12901291   
    12911292    [self cancelCheckIfAllowedToLoadURL:[[check contextInfo] checkRequestID]];
  • trunk/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm

    r45333 r49806  
    271271NSMutableArray* WebContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* defaultMenu)
    272272{
     273    return defaultMenu->platformDescription();
    273274    id delegate = [m_webView UIDelegate];
    274275    SEL selector = @selector(webView:contextMenuItemsForElement:defaultMenuItems:);
  • trunk/WebKit/mac/WebCoreSupport/WebEditorClient.mm

    r44451 r49806  
    676676        ASSERT(detailRangeAsNSValue);
    677677        NSRange detailNSRange = [detailRangeAsNSValue rangeValue];
    678         ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0);
     678        ASSERT(detailNSRange.location != NSNotFound);
     679        ASSERT(detailNSRange.length > 0);
    679680        grammarDetail.location = detailNSRange.location;
    680681        grammarDetail.length = detailNSRange.length;
     
    697698        NSRange resultRange = [incomingResult range];
    698699        NSTextCheckingType resultType = [incomingResult resultType];
    699         ASSERT(resultRange.location != NSNotFound && resultRange.length > 0);
     700        ASSERT(resultRange.location != NSNotFound);
     701        ASSERT(resultRange.length > 0);
    700702        if (NSTextCheckingTypeSpelling == resultType && 0 != (checkingTypes & NSTextCheckingTypeSpelling)) {
    701703            TextCheckingResult result;
     
    716718                ASSERT(detailRangeAsNSValue);
    717719                NSRange detailNSRange = [detailRangeAsNSValue rangeValue];
    718                 ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0);
     720                ASSERT(detailNSRange.location != NSNotFound);
     721                ASSERT(detailNSRange.length > 0);
    719722                detail.location = detailNSRange.location;
    720723                detail.length = detailNSRange.length;
  • trunk/WebKit/mac/WebView/WebTextCompletionController.mm

    r47341 r49806  
    299299{
    300300    int selectedRow = [_tableView selectedRow];
    301     ASSERT(selectedRow >= 0 && selectedRow < (int)[_completions count]);
     301    ASSERT(selectedRow >= 0);
     302    ASSERT(selectedRow < (int)[_completions count]);
    302303    [self _insertMatch:[_completions objectAtIndex:selectedRow]];
    303304}
Note: See TracChangeset for help on using the changeset viewer.