Changeset 104902 in webkit
- Timestamp:
- Jan 13, 2012 12:47:04 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r104881 r104902 1 2012-01-13 Hajime Morrita <morrita@chromium.org> 2 3 [Mac][DRT] Should support --no-timeout 4 https://bugs.webkit.org/show_bug.cgi?id=76242 5 6 Reviewed by Darin Adler. 7 8 * DumpRenderTree/mac/DumpRenderTree.mm: 9 (initializeGlobalsFromCommandLineOptions): Added "--no-timeout" to the options list. 10 (setWaitToDumpWatchdog): Added to encapsulate the waitToDumpWatchdog global variable. 11 (shouldSetWaitToDumpWatchdog): Added to check the useTimeoutWatchdog flag set by the option. 12 * DumpRenderTree/mac/DumpRenderTreeMac.h: 13 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 14 (LayoutTestController::setWaitToDump): Now calls shouldSetWaitToDumpWatchdog() to check the flag. 15 1 16 2012-01-12 Simon Fraser <simon.fraser@apple.com> 2 17 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r104881 r104902 130 130 131 131 CFMutableSetRef disallowedURLs = 0; 132 CFRunLoopTimerRef waitToDumpWatchdog = 0;132 static CFRunLoopTimerRef waitToDumpWatchdog = 0; 133 133 134 134 // Delegates … … 144 144 static int threaded; 145 145 static int dumpTree = YES; 146 static int useTimeoutWatchdog = YES; 146 147 static int forceComplexText; 147 148 static int gcBetweenTests; … … 766 767 {"complex-text", no_argument, &forceComplexText, YES}, 767 768 {"gc-between-tests", no_argument, &gcBetweenTests, YES}, 769 {"no-timeout", no_argument, &useTimeoutWatchdog, NO}, 768 770 {NULL, 0, NULL, 0} 769 771 }; … … 1100 1102 waitToDumpWatchdog = 0; 1101 1103 } 1104 } 1105 1106 void setWaitToDumpWatchdog(CFRunLoopTimerRef timer) 1107 { 1108 ASSERT(timer); 1109 ASSERT(shouldSetWaitToDumpWatchdog()); 1110 waitToDumpWatchdog = timer; 1111 CFRunLoopAddTimer(CFRunLoopGetCurrent(), waitToDumpWatchdog, kCFRunLoopCommonModes); 1112 } 1113 1114 bool shouldSetWaitToDumpWatchdog() 1115 { 1116 return !waitToDumpWatchdog && useTimeoutWatchdog; 1102 1117 } 1103 1118 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
r80892 r104902 62 62 extern const unsigned maxViewWidth; 63 63 64 extern CFRunLoopTimerRef waitToDumpWatchdog; 64 void setWaitToDumpWatchdog(CFRunLoopTimerRef); 65 bool shouldSetWaitToDumpWatchdog(); 65 66 66 67 WebView* createWebViewAndOffscreenWindow(); -
trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r101953 r104902 725 725 { 726 726 m_waitToDump = waitUntilDone; 727 if (m_waitToDump && !waitToDumpWatchdog) { 728 waitToDumpWatchdog = CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + waitToDumpWatchdogInterval, 0, 0, 0, waitUntilDoneWatchdogFired, NULL); 729 CFRunLoopAddTimer(CFRunLoopGetCurrent(), waitToDumpWatchdog, kCFRunLoopCommonModes); 730 } 727 if (m_waitToDump && shouldSetWaitToDumpWatchdog()) 728 setWaitToDumpWatchdog(CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + waitToDumpWatchdogInterval, 0, 0, 0, waitUntilDoneWatchdogFired, NULL)); 731 729 } 732 730
Note: See TracChangeset
for help on using the changeset viewer.