Changeset 91081 in webkit
- Timestamp:
- Jul 15, 2011 11:38:14 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91077 r91081 1 2011-07-15 Pratik Solanki <psolanki@apple.com> 2 3 Part of https://bugs.webkit.org/show_bug.cgi?id=63674 4 Get webkit to compile with USE(CFNETWORK) enabled on Mac 5 6 Reviewed by David Kilzer. 7 8 Get LoaderRunLoop to work on Mac when USE(CFNETWORK) is enabled. Although we could use the 9 main run loop, it's better to have a separate thread handling the loads so that it can work 10 in parallel to the main thread. This is similar to what NSURLConnection does for us 11 internally when we use the NS APIs. 12 13 No new tests because no change in functionality and option is not enabled on Mac. 14 15 * platform/network/cf/LoaderRunLoopCF.cpp: 16 (WebCore::runLoaderThread): Create an autorelease pool for objc code that might be called in 17 the run loop. 18 (WebCore::loaderRunLoop): 19 * platform/network/cf/LoaderRunLoopCF.h: 20 1 21 2011-07-15 Xiaomei Ji <xji@chromium.org> 2 22 -
trunk/Source/WebCore/platform/network/cf/LoaderRunLoopCF.cpp
r77937 r91081 29 29 #if USE(CFNETWORK) 30 30 31 #include "AutodrainedPool.h" 31 32 #include <CoreFoundation/CoreFoundation.h> 33 #include <limits> 32 34 #include <wtf/Threading.h> 33 35 … … 49 51 CFRunLoopAddSource(loaderRunLoopObject, bogusSource, kCFRunLoopDefaultMode); 50 52 51 CFRunLoopRun(); 53 SInt32 result; 54 do { 55 AutodrainedPool pool; 56 result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, std::numeric_limits<double>::max(), true); 57 } while (result != kCFRunLoopRunStopped && result != kCFRunLoopRunFinished); 52 58 53 59 return 0; … … 60 66 createThread(runLoaderThread, 0, "WebCore: CFNetwork Loader"); 61 67 while (!loaderRunLoopObject) { 62 // FIXME: Sleep 10? that can't be right... 68 // FIXME: <http://webkit.org/b/55402> - loaderRunLoop() should use synchronization instead of while loop 69 #if PLATFORM(WIN) 63 70 Sleep(10); 71 #else 72 struct timespec sleepTime = { 0, 10 * 1000 * 1000 }; 73 nanosleep(&sleepTime, 0); 74 #endif 64 75 } 65 76 } -
trunk/Source/WebCore/platform/network/cf/LoaderRunLoopCF.h
r82308 r91081 29 29 #if USE(CFNETWORK) 30 30 31 #if !PLATFORM(WIN)32 #error This code is not needed on platforms other than Windows, because the CFRunLoop from the main thread can be used.33 #endif34 35 31 typedef struct __CFRunLoop* CFRunLoopRef; 36 32
Note: See TracChangeset
for help on using the changeset viewer.