Changeset 101041 in webkit
- Timestamp:
- Nov 22, 2011 7:30:34 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r100989 r101041 1 2011-11-22 Daniel Bates <dbates@rim.com> 2 3 Add WTF infrastructure for the BlackBerry port 4 https://bugs.webkit.org/show_bug.cgi?id=72970 5 6 Reviewed by Antonio Gomes. 7 8 * wtf/Assertions.cpp: Added BlackBerry-specific logging directive. 9 * wtf/MathExtras.h: 10 (abs): Added; stdlib doesn't contain abs() on QNX. 11 * wtf/Platform.h: Define WTF_PLATFORM_BLACKBERRY and enable some platform features. 12 * wtf/RandomNumberSeed.h: 13 (WTF::initializeRandomNumberGenerator): For the BlackBerry port, we initialize 14 the bad pseudo random number generator using time(3) before initializing the 15 Mersenne Twister random number generator. 16 * wtf/ThreadingPthreads.cpp: 17 (WTF::createThreadInternal): Added. 18 * wtf/blackberry: Added. 19 * wtf/blackberry/MainThreadBlackBerry.cpp: Added. 20 (WTF::initializeMainThreadPlatform): 21 (WTF::scheduleDispatchFunctionsOnMainThread): 22 * wtf/text/WTFString.h: Added constructor and conversion operator for 23 BlackBerry WebString string object. 24 1 25 2011-11-22 Sheriff Bot <webkit.review.bot@gmail.com> 2 26 -
trunk/Source/JavaScriptCore/wtf/Assertions.cpp
r97557 r101041 56 56 #endif 57 57 58 #if PLATFORM(BLACKBERRY) 59 #include <BlackBerryPlatformMisc.h> 60 #endif 61 58 62 extern "C" { 59 63 … … 78 82 return; 79 83 } 80 84 #elif PLATFORM(BLACKBERRY) 85 BlackBerry::Platform::logV(BlackBerry::Platform::LogLevelInfo, format, args); 81 86 #elif HAVE(ISDEBUGGERPRESENT) 82 87 if (IsDebuggerPresent()) { -
trunk/Source/JavaScriptCore/wtf/MathExtras.h
r99161 r101041 51 51 #endif 52 52 53 #if OS(QNX) 54 // FIXME: Look into a way to have cmath import its functions into both the standard and global 55 // namespace. For now, we include math.h since the QNX cmath header only imports its functions 56 // into the standard namespace. 57 #include <math.h> 58 #endif 59 53 60 #ifndef M_PI 54 61 const double piDouble = 3.14159265358979323846; … … 132 139 inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); } 133 140 141 #endif 142 143 #if COMPILER(GCC) && OS(QNX) 144 // The stdlib on QNX doesn't contain long abs(long). See PR #104666. 145 inline long long abs(long num) { return labs(num); } 134 146 #endif 135 147 -
trunk/Source/JavaScriptCore/wtf/Platform.h
r100989 r101041 2 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.4 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. 5 5 * 6 6 * Redistribution and use in source and binary forms, with or without … … 410 410 /* PLATFORM(WX) */ 411 411 /* PLATFORM(GTK) */ 412 /* PLATFORM(BLACKBERRY) */ 412 413 /* PLATFORM(MAC) */ 413 414 /* PLATFORM(WIN) */ … … 420 421 #elif defined(BUILDING_GTK__) 421 422 #define WTF_PLATFORM_GTK 1 423 #elif defined(BUILDING_BLACKBERRY__) 424 #define WTF_PLATFORM_BLACKBERRY 1 422 425 #elif OS(DARWIN) 423 426 #define WTF_PLATFORM_MAC 1 … … 469 472 #define WTF_USE_CHROMIUM_NET 1 470 473 #endif 474 #endif 475 476 #if PLATFORM(BLACKBERRY) 477 #define ENABLE_DRAG_SUPPORT 0 478 #define USE_SYSTEM_MALLOC 1 479 #define WTF_USE_MERSENNE_TWISTER_19937 1 480 #define WTF_USE_SKIA 1 471 481 #endif 472 482 -
trunk/Source/JavaScriptCore/wtf/RandomNumberSeed.h
r95901 r101041 57 57 #elif COMPILER(MSVC) && defined(_CRT_RAND_S) 58 58 // On Windows we use rand_s which initialises itself 59 #elif OS(UNIX) 59 #elif OS(UNIX) && !PLATFORM(BLACKBERRY) 60 60 // srandomdev is not guaranteed to exist on linux so we use this poor seed, this should be improved 61 61 timeval time; -
trunk/Source/JavaScriptCore/wtf/ThreadingPthreads.cpp
r95511 r101041 2 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 56 57 #endif 57 58 59 #if PLATFORM(BLACKBERRY) 60 #include <BlackBerryPlatformMisc.h> 61 #include <BlackBerryPlatformSettings.h> 62 #endif 63 58 64 namespace WTF { 59 65 … … 147 153 } 148 154 155 #if PLATFORM(BLACKBERRY) 156 ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char* threadName) 157 { 158 pthread_attr_t attr; 159 if (pthread_attr_init(&attr)) { 160 LOG_ERROR("pthread_attr_init() failed: %d", errno); 161 return 0; 162 } 163 164 void* stackAddr; 165 size_t stackSize; 166 if (pthread_attr_getstack(&attr, &stackAddr, &stackSize)) 167 LOG_ERROR("pthread_attr_getstack() failed: %d", errno); 168 else { 169 stackSize = BlackBerry::Platform::Settings::get()->secondaryThreadStackSize(); 170 if (pthread_attr_setstack(&attr, stackAddr, stackSize)) 171 LOG_ERROR("pthread_attr_getstack() failed: %d", errno); 172 } 173 174 pthread_t threadHandle; 175 if (pthread_create(&threadHandle, &attr, entryPoint, data)) { 176 LOG_ERROR("pthread_create() failed: %d", errno); 177 threadHandle = 0; 178 } 179 pthread_setname_np(threadHandle, threadName); 180 181 pthread_attr_destroy(&attr); 182 183 if (!threadHandle) 184 return 0; 185 186 return establishIdentifierForPthreadHandle(threadHandle); 187 } 188 #else 149 189 ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*) 150 190 { … … 157 197 return establishIdentifierForPthreadHandle(threadHandle); 158 198 } 199 #endif 159 200 160 201 void initializeCurrentThreadInternal(const char* threadName) -
trunk/Source/JavaScriptCore/wtf/text/WTFString.h
r100510 r101041 47 47 #endif 48 48 49 #if PLATFORM(BLACKBERRY) 50 namespace BlackBerry { 51 namespace WebKit { 52 class WebString; 53 } 54 } 55 #endif 56 49 57 namespace WTF { 50 58 … … 333 341 WTF_EXPORT_PRIVATE String(const wxString&); 334 342 WTF_EXPORT_PRIVATE operator wxString() const; 343 #endif 344 345 #if PLATFORM(BLACKBERRY) 346 String(const BlackBerry::WebKit::WebString&); 347 operator BlackBerry::WebKit::WebString() const; 335 348 #endif 336 349
Note: See TracChangeset
for help on using the changeset viewer.