Changeset 167308 in webkit


Ignore:
Timestamp:
Apr 15, 2014 9:19:08 AM (10 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

Remove unnecessary null checking in NavigatorContentUtils
https://bugs.webkit.org/show_bug.cgi?id=131652

Reviewed by Darin Adler.

Some functions have checked if document is null. However, document is always not
null when frame is existed.

No new tests, no behavior changes.

  • Modules/navigatorcontentutils/NavigatorContentUtils.cpp:

(WebCore::NavigatorContentUtils::registerProtocolHandler):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
(WebCore::NavigatorContentUtils::unregisterProtocolHandler):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167303 r167308  
     12014-04-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        Remove unnecessary null checking in NavigatorContentUtils
     4        https://bugs.webkit.org/show_bug.cgi?id=131652
     5
     6        Reviewed by Darin Adler.
     7
     8        Some functions have checked if document is null. However, document is always not
     9        null when frame is existed.
     10
     11        No new tests, no behavior changes.
     12
     13        * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
     14        (WebCore::NavigatorContentUtils::registerProtocolHandler):
     15        (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
     16        (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
     17
    1182014-04-15  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp

    r166915 r167308  
    137137        return;
    138138
    139     Document* document = navigator->frame()->document();
    140     if (!document)
    141         return;
    142 
    143     URL baseURL = document->baseURL();
     139    URL baseURL = navigator->frame()->document()->baseURL();
    144140
    145141    if (!verifyCustomHandlerURL(baseURL, url, ec))
     
    179175        return declined;
    180176
    181     Document* document = navigator->frame()->document();
    182     if (!document)
    183         return declined;
    184 
    185     URL baseURL = document->baseURL();
     177    URL baseURL = navigator->frame()->document()->baseURL();
    186178
    187179    if (!verifyCustomHandlerURL(baseURL, url, ec))
     
    199191        return;
    200192
    201     Document* document = navigator->frame()->document();
    202     if (!document)
    203         return;
    204    
    205     URL baseURL = document->baseURL();
     193    URL baseURL = navigator->frame()->document()->baseURL();
    206194
    207195    if (!verifyCustomHandlerURL(baseURL, url, ec))
Note: See TracChangeset for help on using the changeset viewer.