Changeset 184853 in webkit


Ignore:
Timestamp:
May 25, 2015 7:26:34 PM (9 years ago)
Author:
mitz@apple.com
Message:

ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
https://bugs.webkit.org/show_bug.cgi?id=145372

Reviewed by Sam Weinig.

Source/WebCore:

  • Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
  • bindings/objc/DOMAbstractView.mm:

(-[DOMAbstractView dealloc]): Removed use of DOM_ASSERT_MAIN_THREAD.
(kit): Ditto.

  • bindings/objc/ExceptionHandlers.h: Removed definition of DOM_ASSERT_MAIN_THREAD.
  • bindings/scripts/CodeGeneratorObjC.pm:

(GenerateImplementation): Don’t emit DOM_ASSERT_MAIN_THREAD.

Updated expected bindings test results:

  • bindings/scripts/test/ObjC/DOMFloat64Array.mm:
  • bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
  • bindings/scripts/test/ObjC/DOMTestCallback.mm:
  • bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
  • bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
  • bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
  • bindings/scripts/test/ObjC/DOMTestException.mm:
  • bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
  • bindings/scripts/test/ObjC/DOMTestInterface.mm:
  • bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
  • bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
  • bindings/scripts/test/ObjC/DOMTestNode.mm:
  • bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
  • bindings/scripts/test/ObjC/DOMTestObj.mm:
  • bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
  • bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
  • bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
  • bindings/scripts/test/ObjC/DOMattribute.mm:
  • bindings/scripts/test/ObjC/DOMreadonly.mm:

Source/WebKit/ios:

  • Misc/WebGeolocationCoreLocationProvider.mm:

(-[WebGeolocationCoreLocationProvider initWithListener:]): Removed use of ASSERT_MAIN_THREAD.
(-[WebGeolocationCoreLocationProvider dealloc]): Ditto.
(-[WebGeolocationCoreLocationProvider requestGeolocationAuthorization]): Ditto.
(-[WebGeolocationCoreLocationProvider start]): Ditto.
(-[WebGeolocationCoreLocationProvider stop]): Ditto.
(-[WebGeolocationCoreLocationProvider setEnableHighAccuracy:]): Ditto.

Source/WebKit/mac:

  • Carbon/CarbonWindowAdapter.mm:

(-[CarbonWindowAdapter finalize]): Removed use of ASSERT_MAIN_THREAD.

  • Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
  • History/WebHistoryItem.mm:

(-[WebHistoryItem URLString]): Removed use of ASSERT_MAIN_THREAD.
(-[WebHistoryItem originalURLString]): Ditto.
(-[WebHistoryItem title]): Ditto.
(-[WebHistoryItem lastVisitedTimeInterval]): Ditto.
(-[WebHistoryItem isEqual:]): Ditto.
(-[WebHistoryItem description]): Ditto.
(-[WebHistoryItem initFromDictionaryRepresentation:]): Ditto.
(-[WebHistoryItem scrollPoint]): Ditto.

  • Misc/WebElementDictionary.mm:

(-[WebElementDictionary finalize]): Ditto.

  • Misc/WebIconDatabase.mm:

(-[WebIconDatabase iconForURL:withSize:cache:]): Ditto.
(-[WebIconDatabase iconURLForURL:]): Ditto.
(-[WebIconDatabase defaultIconWithSize:]): Ditto.
(-[WebIconDatabase retainIconForURL:]): Ditto.
(-[WebIconDatabase releaseIconForURL:]): Ditto.
(+[WebIconDatabase delayDatabaseCleanup]): Ditto.
(+[WebIconDatabase allowDatabaseCleanup]): Ditto.
(-[WebIconDatabase removeAllIcons]): Ditto.
(-[WebIconDatabase _iconForFileURL:withSize:]): Ditto.
(webGetNSImage): Ditto.

  • Misc/WebKitLogging.h: Removed definition of ASSERT_MAIN_THREAD.
  • Plugins/WebBaseNetscapePluginView.mm:

(-[WebBaseNetscapePluginView finalize]): Removed use of ASSERT_MAIN_THREAD.

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage finalize]): Ditto.

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView finalize]): Ditto.

  • WebCoreSupport/WebEditorClient.mm:

(-[WebUndoStep finalize]): Ditto.

  • WebView/WebDataSource.mm:

(-[WebDataSource finalize]): Ditto.

  • WebView/WebHTMLView.mm:

(-[WebHTMLViewPrivate finalize]): Ditto.
(-[WebHTMLView finalize]): Ditto.
(-[WebHTMLView drawRect:]): Ditto.

  • WebView/WebViewData.mm:

(-[WebViewPrivate finalize]): Ditto.

Source/WebKit2:

  • Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
Location:
trunk/Source
Files:
42 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r184852 r184853  
     12015-05-25  Dan Bernstein  <mitz@apple.com>
     2
     3        ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
     4        https://bugs.webkit.org/show_bug.cgi?id=145372
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
     9
     10        * bindings/objc/DOMAbstractView.mm:
     11        (-[DOMAbstractView dealloc]): Removed use of DOM_ASSERT_MAIN_THREAD.
     12        (kit): Ditto.
     13
     14        * bindings/objc/ExceptionHandlers.h: Removed definition of DOM_ASSERT_MAIN_THREAD.
     15
     16        * bindings/scripts/CodeGeneratorObjC.pm:
     17        (GenerateImplementation): Don’t emit DOM_ASSERT_MAIN_THREAD.
     18
     19        Updated expected bindings test results:
     20        * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
     21        * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
     22        * bindings/scripts/test/ObjC/DOMTestCallback.mm:
     23        * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
     24        * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
     25        * bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
     26        * bindings/scripts/test/ObjC/DOMTestException.mm:
     27        * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
     28        * bindings/scripts/test/ObjC/DOMTestInterface.mm:
     29        * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
     30        * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
     31        * bindings/scripts/test/ObjC/DOMTestNode.mm:
     32        * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
     33        * bindings/scripts/test/ObjC/DOMTestObj.mm:
     34        * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
     35        * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
     36        * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
     37        * bindings/scripts/test/ObjC/DOMattribute.mm:
     38        * bindings/scripts/test/ObjC/DOMreadonly.mm:
     39
    1402015-05-25  Hunseop Jeong  <hs85.jeong@samsung.com>
    241
  • trunk/Source/WebCore/Configurations/Base.xcconfig

    r183929 r184853  
    8989// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
    9090// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
    91 DEBUG_DEFINES_debug = DISABLE_THREAD_CHECK;
     91DEBUG_DEFINES_debug = ;
    9292DEBUG_DEFINES_normal = NDEBUG;
    9393DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
  • trunk/Source/WebCore/bindings/objc/DOMAbstractView.mm

    r165676 r184853  
    4545- (void)dealloc
    4646{
    47     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); }
     47    WebCoreThreadViolationCheckRoundOne();
    4848    [super dealloc];
    4949}
     
    8080DOMAbstractView *kit(WebCore::DOMWindow* value)
    8181{
    82     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     82    WebCoreThreadViolationCheckRoundOne();
    8383
    8484    if (!value)
  • trunk/Source/WebCore/bindings/objc/ExceptionHandlers.h

    r165676 r184853  
    2929#include <wtf/Assertions.h>
    3030
    31 #if !defined(NDEBUG) && !defined(DISABLE_THREAD_CHECK)
    32 #define DOM_ASSERT_MAIN_THREAD() do \
    33     if (!pthread_main_np()) { \
    34         WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "DOM access on non-main thread -- you will probably crash soon!"); \
    35     } \
    36 while (0)
    37 #else
    38 #define DOM_ASSERT_MAIN_THREAD() ((void)0)
    39 #endif
    40 
    4131namespace WebCore {
    4232   
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm

    r183343 r184853  
    110110my $jsContextSetter = "WebCore::JSMainThreadNullState state;";
    111111my $exceptionRaiseOnError = "WebCore::raiseOnDOMError(ec);";
    112 my $assertMainThread = "{ DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); }";
     112my $threadViolationCheck = "WebCoreThreadViolationCheckRoundOne();";
    113113
    114114my %conflictMethod = (
     
    16771677        push(@implContent, "$className *kit($implType* value)\n");
    16781678        push(@implContent, "{\n");
    1679         push(@implContent, "    $assertMainThread;\n");
     1679        push(@implContent, "    $threadViolationCheck\n");
    16801680        push(@implContent, "    if (!value)\n");
    16811681        push(@implContent, "        return nil;\n");
     
    16971697        push(@implContent, "$className *kit($implType* value)\n");
    16981698        push(@implContent, "{\n");
    1699         push(@implContent, "    $assertMainThread;\n");
     1699        push(@implContent, "    $threadViolationCheck;\n");
    17001700        push(@implContent, "    return static_cast<$className*>(kit(static_cast<WebCore::$baseClass*>(value)));\n");
    17011701        push(@implContent, "}\n");
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMFloat64Array.mm

    r165676 r184853  
    6464DOMFloat64Array *kit(WebCore::Float64Array* value)
    6565{
    66     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     66    WebCoreThreadViolationCheckRoundOne();
    6767    return static_cast<DOMFloat64Array*>(kit(static_cast<WebCore::Node*>(value)));
    6868}
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm

    r165676 r184853  
    9090DOMTestActiveDOMObject *kit(WebCore::TestActiveDOMObject* value)
    9191{
    92     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     92    WebCoreThreadViolationCheckRoundOne();
    9393    if (!value)
    9494        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm

    r178575 r184853  
    132132DOMTestCallback *kit(WebCore::TestCallback* value)
    133133{
    134     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     134    WebCoreThreadViolationCheckRoundOne();
    135135    if (!value)
    136136        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm

    r165676 r184853  
    7777DOMTestCustomNamedGetter *kit(WebCore::TestCustomNamedGetter* value)
    7878{
    79     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     79    WebCoreThreadViolationCheckRoundOne();
    8080    if (!value)
    8181        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.mm

    r165676 r184853  
    8484DOMTestEventConstructor *kit(WebCore::TestEventConstructor* value)
    8585{
    86     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     86    WebCoreThreadViolationCheckRoundOne();
    8787    if (!value)
    8888        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventTarget.mm

    r165676 r184853  
    105105DOMTestEventTarget *kit(WebCore::TestEventTarget* value)
    106106{
    107     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     107    WebCoreThreadViolationCheckRoundOne();
    108108    if (!value)
    109109        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.mm

    r165676 r184853  
    7777DOMTestException *kit(WebCore::TestException* value)
    7878{
    79     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     79    WebCoreThreadViolationCheckRoundOne();
    8080    if (!value)
    8181        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm

    r165676 r184853  
    7070DOMTestGenerateIsReachable *kit(WebCore::TestGenerateIsReachable* value)
    7171{
    72     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     72    WebCoreThreadViolationCheckRoundOne();
    7373    if (!value)
    7474        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm

    r165676 r184853  
    268268DOMTestInterface *kit(WebCore::TestInterface* value)
    269269{
    270     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     270    WebCoreThreadViolationCheckRoundOne();
    271271    if (!value)
    272272        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm

    r165676 r184853  
    7878DOMTestMediaQueryListListener *kit(WebCore::TestMediaQueryListListener* value)
    7979{
    80     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     80    WebCoreThreadViolationCheckRoundOne();
    8181    if (!value)
    8282        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm

    r165676 r184853  
    7070DOMTestNamedConstructor *kit(WebCore::TestNamedConstructor* value)
    7171{
    72     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     72    WebCoreThreadViolationCheckRoundOne();
    7373    if (!value)
    7474        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestNode.mm

    r165676 r184853  
    5252DOMTestNode *kit(WebCore::TestNode* value)
    5353{
    54     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     54    WebCoreThreadViolationCheckRoundOne();
    5555    return static_cast<DOMTestNode*>(kit(static_cast<WebCore::Node*>(value)));
    5656}
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestNondeterministic.mm

    r167140 r184853  
    136136DOMTestNondeterministic *kit(WebCore::TestNondeterministic* value)
    137137{
    138     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     138    WebCoreThreadViolationCheckRoundOne();
    139139    if (!value)
    140140        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm

    r184643 r184853  
    11931193DOMTestObj *kit(WebCore::TestObj* value)
    11941194{
    1195     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     1195    WebCoreThreadViolationCheckRoundOne();
    11961196    if (!value)
    11971197        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm

    r165676 r184853  
    7070DOMTestOverloadedConstructors *kit(WebCore::TestOverloadedConstructors* value)
    7171{
    72     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     72    WebCoreThreadViolationCheckRoundOne();
    7373    if (!value)
    7474        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm

    r165676 r184853  
    114114DOMTestSerializedScriptValueInterface *kit(WebCore::TestSerializedScriptValueInterface* value)
    115115{
    116     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     116    WebCoreThreadViolationCheckRoundOne();
    117117    if (!value)
    118118        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm

    r165676 r184853  
    178178DOMTestTypedefs *kit(WebCore::TestTypedefs* value)
    179179{
    180     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     180    WebCoreThreadViolationCheckRoundOne();
    181181    if (!value)
    182182        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMattribute.mm

    r165676 r184853  
    7777DOMattribute *kit(WebCore::attribute* value)
    7878{
    79     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     79    WebCoreThreadViolationCheckRoundOne();
    8080    if (!value)
    8181        return nil;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMreadonly.mm

    r165676 r184853  
    7070DOMreadonly *kit(WebCore::readonly* value)
    7171{
    72     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
     72    WebCoreThreadViolationCheckRoundOne();
    7373    if (!value)
    7474        return nil;
  • trunk/Source/WebKit/ios/ChangeLog

    r183498 r184853  
     12015-05-25  Dan Bernstein  <mitz@apple.com>
     2
     3        ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
     4        https://bugs.webkit.org/show_bug.cgi?id=145372
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Misc/WebGeolocationCoreLocationProvider.mm:
     9        (-[WebGeolocationCoreLocationProvider initWithListener:]): Removed use of ASSERT_MAIN_THREAD.
     10        (-[WebGeolocationCoreLocationProvider dealloc]): Ditto.
     11        (-[WebGeolocationCoreLocationProvider requestGeolocationAuthorization]): Ditto.
     12        (-[WebGeolocationCoreLocationProvider start]): Ditto.
     13        (-[WebGeolocationCoreLocationProvider stop]): Ditto.
     14        (-[WebGeolocationCoreLocationProvider setEnableHighAccuracy:]): Ditto.
     15
    1162015-04-28  Brady Eidson  <beidson@apple.com>
    217
  • trunk/Source/WebKit/ios/Misc/WebGeolocationCoreLocationProvider.mm

    r176924 r184853  
    7474- (id)initWithListener:(id<WebGeolocationCoreLocationUpdateListener>)listener
    7575{
    76     ASSERT_MAIN_THREAD();
    7776    self = [super init];
    7877    if (self) {
     
    8584- (void)dealloc
    8685{
    87     ASSERT_MAIN_THREAD();
    8886    [_locationManager setDelegate:nil];
    8987    [super dealloc];
     
    9290- (void)requestGeolocationAuthorization
    9391{
    94     ASSERT_MAIN_THREAD();
    95 
    9692    if (![getCLLocationManagerClass() locationServicesEnabled]) {
    9793        [_positionListener geolocationAuthorizationDenied];
     
    126122- (void)start
    127123{
    128     ASSERT_MAIN_THREAD();
    129 
    130124    if (![getCLLocationManagerClass() locationServicesEnabled]
    131125        || !isAuthorizationGranted([getCLLocationManagerClass() authorizationStatus])) {
     
    140134- (void)stop
    141135{
    142     ASSERT_MAIN_THREAD();
    143136    [_locationManager stopUpdatingLocation];
    144137}
     
    222215- (void)setEnableHighAccuracy:(BOOL)flag
    223216{
    224     ASSERT_MAIN_THREAD();
    225217    [_locationManager setDesiredAccuracy:flag ? kCLLocationAccuracyBest : kCLLocationAccuracyHundredMeters];
    226218}
  • trunk/Source/WebKit/mac/Carbon/CarbonWindowAdapter.mm

    r166378 r184853  
    298298
    299299- (void)finalize {
    300     ASSERT_MAIN_THREAD();
    301300    if (_eventHandler) RemoveEventHandler(_eventHandler);
    302301    [super finalize];
  • trunk/Source/WebKit/mac/ChangeLog

    r184845 r184853  
     12015-05-25  Dan Bernstein  <mitz@apple.com>
     2
     3        ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
     4        https://bugs.webkit.org/show_bug.cgi?id=145372
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Carbon/CarbonWindowAdapter.mm:
     9        (-[CarbonWindowAdapter finalize]): Removed use of ASSERT_MAIN_THREAD.
     10
     11        * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
     12
     13        * History/WebHistoryItem.mm:
     14        (-[WebHistoryItem URLString]): Removed use of ASSERT_MAIN_THREAD.
     15        (-[WebHistoryItem originalURLString]): Ditto.
     16        (-[WebHistoryItem title]): Ditto.
     17        (-[WebHistoryItem lastVisitedTimeInterval]): Ditto.
     18        (-[WebHistoryItem isEqual:]): Ditto.
     19        (-[WebHistoryItem description]): Ditto.
     20        (-[WebHistoryItem initFromDictionaryRepresentation:]): Ditto.
     21        (-[WebHistoryItem scrollPoint]): Ditto.
     22
     23        * Misc/WebElementDictionary.mm:
     24        (-[WebElementDictionary finalize]): Ditto.
     25
     26        * Misc/WebIconDatabase.mm:
     27        (-[WebIconDatabase iconForURL:withSize:cache:]): Ditto.
     28        (-[WebIconDatabase iconURLForURL:]): Ditto.
     29        (-[WebIconDatabase defaultIconWithSize:]): Ditto.
     30        (-[WebIconDatabase retainIconForURL:]): Ditto.
     31        (-[WebIconDatabase releaseIconForURL:]): Ditto.
     32        (+[WebIconDatabase delayDatabaseCleanup]): Ditto.
     33        (+[WebIconDatabase allowDatabaseCleanup]): Ditto.
     34        (-[WebIconDatabase removeAllIcons]): Ditto.
     35        (-[WebIconDatabase _iconForFileURL:withSize:]): Ditto.
     36        (webGetNSImage): Ditto.
     37
     38        * Misc/WebKitLogging.h: Removed definition of ASSERT_MAIN_THREAD.
     39
     40        * Plugins/WebBaseNetscapePluginView.mm:
     41        (-[WebBaseNetscapePluginView finalize]): Removed use of ASSERT_MAIN_THREAD.
     42
     43        * Plugins/WebBasePluginPackage.mm:
     44        (-[WebBasePluginPackage finalize]): Ditto.
     45
     46        * Plugins/WebNetscapePluginView.mm:
     47        (-[WebNetscapePluginView finalize]): Ditto.
     48
     49        * WebCoreSupport/WebEditorClient.mm:
     50        (-[WebUndoStep finalize]): Ditto.
     51
     52        * WebView/WebDataSource.mm:
     53        (-[WebDataSource finalize]): Ditto.
     54
     55        * WebView/WebHTMLView.mm:
     56        (-[WebHTMLViewPrivate finalize]): Ditto.
     57        (-[WebHTMLView finalize]): Ditto.
     58        (-[WebHTMLView drawRect:]): Ditto.
     59
     60        * WebView/WebViewData.mm:
     61        (-[WebViewPrivate finalize]): Ditto.
     62
    1632015-05-23  Dan Bernstein  <mitz@apple.com>
    264
  • trunk/Source/WebKit/mac/Configurations/Base.xcconfig

    r183929 r184853  
    8181// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
    8282// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
    83 DEBUG_DEFINES_debug = DISABLE_THREAD_CHECK;
     83DEBUG_DEFINES_debug = ;
    8484DEBUG_DEFINES_normal = NDEBUG;
    8585DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
  • trunk/Source/WebKit/mac/History/WebHistoryItem.mm

    r179472 r184853  
    182182- (NSString *)URLString
    183183{
    184     ASSERT_MAIN_THREAD();
    185184    return nsStringNilIfEmpty(core(_private)->urlString());
    186185}
     
    190189- (NSString *)originalURLString
    191190{
    192     ASSERT_MAIN_THREAD();
    193191    return nsStringNilIfEmpty(core(_private)->originalURLString());
    194192}
     
    196194- (NSString *)title
    197195{
    198     ASSERT_MAIN_THREAD();
    199196    return nsStringNilIfEmpty(core(_private)->title());
    200197}
     
    219216- (NSTimeInterval)lastVisitedTimeInterval
    220217{
    221     ASSERT_MAIN_THREAD();
    222218    return _private->_lastVisitedTime;
    223219}
     
    230226- (BOOL)isEqual:(id)anObject
    231227{
    232     ASSERT_MAIN_THREAD();
    233     if (![anObject isMemberOfClass:[WebHistoryItem class]]) {
     228    if (![anObject isMemberOfClass:[WebHistoryItem class]])
    234229        return NO;
    235     }
    236    
     230
    237231    return core(_private)->urlString() == core(((WebHistoryItem*)anObject)->_private)->urlString();
    238232}
     
    240234- (NSString *)description
    241235{
    242     ASSERT_MAIN_THREAD();
    243236    HistoryItem* coreItem = core(_private);
    244237    NSMutableString *result = [NSMutableString stringWithFormat:@"%@ %@", [super description], (NSString*)coreItem->urlString()];
     
    345338- (id)initFromDictionaryRepresentation:(NSDictionary *)dict
    346339{
    347     ASSERT_MAIN_THREAD();
    348340    NSString *URLString = [dict _webkit_stringForKey:@""];
    349341    NSString *title = [dict _webkit_stringForKey:titleKey];
     
    414406- (NSPoint)scrollPoint
    415407{
    416     ASSERT_MAIN_THREAD();
    417408    return core(_private)->scrollPoint();
    418409}
     
    445436#endif
    446437{
    447     ASSERT_MAIN_THREAD();
    448438    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:8];
    449439
     
    512502- (NSString *)target
    513503{
    514     ASSERT_MAIN_THREAD();
    515504    return nsStringNilIfEmpty(core(_private)->target());
    516505}
     
    533522- (NSArray *)children
    534523{
    535     ASSERT_MAIN_THREAD();
    536524    const HistoryItemVector& children = core(_private)->children();
    537525    if (!children.size())
     
    549537- (NSURL *)URL
    550538{
    551     ASSERT_MAIN_THREAD();
    552539    const URL& url = core(_private)->url();
    553540    if (url.isEmpty())
     
    558545- (WebHistoryItem *)targetItem
    559546{   
    560     ASSERT_MAIN_THREAD();
    561547    return kit(core(_private)->targetItem());
    562548}
  • trunk/Source/WebKit/mac/Misc/WebElementDictionary.mm

    r182957 r184853  
    126126- (void)finalize
    127127{
    128     ASSERT_MAIN_THREAD();
    129128    delete _result;
    130129    [super finalize];
  • trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm

    r166378 r184853  
    129129- (NSImage *)iconForURL:(NSString *)URL withSize:(NSSize)size cache:(BOOL)cache
    130130{
    131     ASSERT_MAIN_THREAD();
    132131    ASSERT(size.width);
    133132    ASSERT(size.height);
     
    155154    if (![self isEnabled])
    156155        return nil;
    157     ASSERT_MAIN_THREAD();
    158156
    159157    return iconDatabase().synchronousIconURLForPageURL(URL);
     
    162160- (NSImage *)defaultIconWithSize:(NSSize)size
    163161{
    164     ASSERT_MAIN_THREAD();
    165162    ASSERT(size.width);
    166163    ASSERT(size.height);
     
    179176- (void)retainIconForURL:(NSString *)URL
    180177{
    181     ASSERT_MAIN_THREAD();
    182178    ASSERT(URL);
    183179    if (![self isEnabled])
     
    189185- (void)releaseIconForURL:(NSString *)pageURL
    190186{
    191     ASSERT_MAIN_THREAD();
    192187    ASSERT(pageURL);
    193188    if (![self isEnabled])
     
    199194+ (void)delayDatabaseCleanup
    200195{
    201     ASSERT_MAIN_THREAD();
    202 
    203196    IconDatabase::delayDatabaseCleanup();
    204197}
     
    206199+ (void)allowDatabaseCleanup
    207200{
    208     ASSERT_MAIN_THREAD();
    209 
    210201    IconDatabase::allowDatabaseCleanup();
    211202}
     
    246237- (void)removeAllIcons
    247238{
    248     ASSERT_MAIN_THREAD();
    249239    if (![self isEnabled])
    250240        return;
     
    335325- (NSImage *)_iconForFileURL:(NSString *)file withSize:(NSSize)size
    336326{
    337     ASSERT_MAIN_THREAD();
    338327    ASSERT(size.width);
    339328    ASSERT(size.height);
     
    474463NSImage *webGetNSImage(Image* image, NSSize size)
    475464{
    476     ASSERT_MAIN_THREAD();
    477465    ASSERT(size.width);
    478466    ASSERT(size.height);
  • trunk/Source/WebKit/mac/Misc/WebKitLogging.h

    r165676 r184853  
    7676#endif // !LOG_DISABLED
    7777
    78 // FIXME: Why is this in the "logging" header file?
    79 // Use WebCoreThreadViolationCheck instead for checks that throw an exception even in production builds.
    80 #if !defined(NDEBUG) && !defined(DISABLE_THREAD_CHECK)
    81 #define ASSERT_MAIN_THREAD() do \
    82     if (!pthread_main_np()) { \
    83         WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "<not running on main thread>"); \
    84         CRASH(); \
    85     } \
    86 while (0)
    87 #else
    88 #define ASSERT_MAIN_THREAD() ((void)0)
    89 #endif
    90 
    9178void ReportDiscardedDelegateException(SEL delegateSelector, id exception);
    9279
  • trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm

    r174875 r184853  
    131131- (void)finalize
    132132{
    133     ASSERT_MAIN_THREAD();
    134133    ASSERT(!_isStarted);
    135134
  • trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm

    r181562 r184853  
    277277- (void)finalize
    278278{
    279     ASSERT_MAIN_THREAD();
    280279    ASSERT(!pluginDatabases || [pluginDatabases count] == 0);
    281280    [pluginDatabases release];
  • trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm

    r183506 r184853  
    13821382- (void)finalize
    13831383{
    1384     ASSERT_MAIN_THREAD();
    13851384    ASSERT(!_isStarted);
    13861385
  • trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm

    r183368 r184853  
    143143- (void)finalize
    144144{
    145     ASSERT_MAIN_THREAD();
    146 
    147145    [super finalize];
    148146}
  • trunk/Source/WebKit/mac/WebView/WebDataSource.mm

    r184843 r184853  
    438438- (void)finalize
    439439{
    440     ASSERT_MAIN_THREAD();
    441 
    442440    if (toPrivate(_private) && toPrivate(_private)->includedInWebKitStatistics)
    443441        --WebDataSourceCount;
  • trunk/Source/WebKit/mac/WebView/WebHTMLView.mm

    r184843 r184853  
    714714- (void)finalize
    715715{
    716     ASSERT_MAIN_THREAD();
    717 
    718716#if !PLATFORM(IOS)
    719717    if (promisedDragTIFFDataSource)
     
    25302528- (void)finalize
    25312529{
    2532     ASSERT_MAIN_THREAD();
    25332530    // We can't assert that close has already been called because
    25342531    // this view can be removed from it's superview, even though
     
    35393536- (void)drawRect:(NSRect)rect
    35403537{
    3541     ASSERT_MAIN_THREAD();
    35423538    LOG(View, "%@ drawing", self);
    35433539
  • trunk/Source/WebKit/mac/WebView/WebViewData.mm

    r184780 r184853  
    216216- (void)finalize
    217217{
    218     ASSERT_MAIN_THREAD();
    219218#if !PLATFORM(IOS)
    220219    ASSERT(!insertionPasteboard);
  • trunk/Source/WebKit2/ChangeLog

    r184851 r184853  
     12015-05-25  Dan Bernstein  <mitz@apple.com>
     2
     3        ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
     4        https://bugs.webkit.org/show_bug.cgi?id=145372
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
     9
    1102015-05-25  Carlos Garcia Campos  <cgarcia@igalia.com>
    211
  • trunk/Source/WebKit2/Configurations/Base.xcconfig

    r183929 r184853  
    8181// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
    8282// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
    83 DEBUG_DEFINES_debug = DISABLE_THREAD_CHECK;
     83DEBUG_DEFINES_debug = ;
    8484DEBUG_DEFINES_normal = NDEBUG;
    8585DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
Note: See TracChangeset for help on using the changeset viewer.