Changeset 19506 in webkit
- Timestamp:
- Feb 8, 2007 1:01:28 PM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r19503 r19506 1 2007-02-08 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Tim Hatcher 4 5 Tweaked the thread violation behavior to be disabled by default, and to provide 6 an easy breakpoint to set. 7 The possibilities for the "WebCoreThreadCheck" user defaults key are - 8 - The value "None" disables thread checking 9 - The value "Log" causes an NSLog on a violation 10 - The value "Exception" causes exceptions to be raised on a violation 11 12 * platform/Logging.h: 13 * platform/mac/LoggingMac.mm: 14 (WebCore::_WebCoreThreadViolationCheck): 15 (WebCoreReportThreadViolation): In the global namespace, making breakpoints cake! 16 1 17 2007-02-08 Brady Eidson <beidson@apple.com> 2 18 -
trunk/WebCore/platform/Logging.h
r19503 r19506 56 56 } // namespace WebCore 57 57 58 extern "C" void WebCoreReportThreadViolation(const char* funciton, bool threadViolationIsException); 59 58 60 #define WebCoreThreadViolationCheck() do \ 59 61 WebCore::_WebCoreThreadViolationCheck(WTF_PRETTY_FUNCTION); \ -
trunk/WebCore/platform/mac/LoggingMac.mm
r19503 r19506 69 69 { 70 70 static bool fetchDefault = true; 71 static bool performThreadCheck = true;71 static bool performThreadCheck = false; 72 72 static bool threadViolationIsException = false; 73 73 if (fetchDefault) { … … 75 75 if ([threadCheckLevel isEqualToString:@"None"]) 76 76 performThreadCheck = false; 77 else if ([threadCheckLevel isEqualToString:@"Exception"]) 77 else if ([threadCheckLevel isEqualToString:@"Exception"]) { 78 performThreadCheck = true; 78 79 threadViolationIsException = true; 80 } else if ([threadCheckLevel isEqualToString:@"Log"]) { 81 performThreadCheck = true; 82 threadViolationIsException = false; 83 } 79 84 fetchDefault = false; 80 85 } … … 86 91 return; 87 92 93 WebCoreReportThreadViolation(function, threadViolationIsException); 94 } 95 96 } // namespace WebCore 97 98 // Split out the actual reporting of the thread violation to make it easier to set a breakpoint 99 void WebCoreReportThreadViolation(const char* function, bool threadViolationIsException) 100 { 88 101 if (threadViolationIsException) 89 102 [NSException raise:@"WebKitThreadingException" format:@"%s was called from a secondary thread", function]; … … 91 104 NSLog(@"WebKit Threading Violation - %s called from secondary thread", function); 92 105 } 93 94 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.