Changeset 168676 in webkit
- Timestamp:
- May 12, 2014 11:40:08 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168674 r168676 1 2014-05-12 Mark Lam <mark.lam@apple.com> 2 3 WebKit2 on iOS needs to capture the main thread's floating point environment. 4 <https://webkit.org/b/132755> 5 6 Reviewed by Geoffrey Garen. 7 8 * fast/workers/resources/worker-floating-point.js: Added. 9 (runTest1): 10 (doDiv): 11 (runTest2): 12 * fast/workers/worker-floating-point-expected.txt: Added. 13 * fast/workers/worker-floating-point.html: Added. 14 * js/floating-point-denormalized-expected.txt: Added. 15 * js/floating-point-denormalized.html: Added. 16 * js/script-tests/floating-point-denormalized.js: Added. 17 1 18 2014-05-12 Dirk Schulze <krit@webkit.org> 2 19 -
trunk/Source/WebCore/ChangeLog
r168674 r168676 1 2014-05-12 Mark Lam <mark.lam@apple.com> 2 3 WebKit2 on iOS needs to capture the main thread's floating point environment. 4 <https://webkit.org/b/132755> 5 6 Reviewed by Geoffrey Garen. 7 8 For iOS, WorkerThread::workerThread() expects to be able to initialize the 9 worker thread's floating point environment to be the same as the one in the 10 main thread. The FP env of the main thread is expected to have been captured 11 in the mainThreadFEnv global. On WebKit2 for iOS, we neglected to initialize 12 mainThreadFEnv. 13 14 We now introduce a FloatingPointEnvironment class that will encapsulate the main 15 thread (aka "UIThread") fenv, and we'll call FloatingPointEnv::saveMainThreadEnvironment() 16 from ChildProcess::platformInitialize() to ensure that the FloatingPointEnvironment 17 singleton instance is initialized properly for WebKit2. 18 19 In the ChildProcess::platformInitialize(), we also need to initialize the ARMv7 20 FP env to support denormalized numbers. We'll do this before calling 21 saveMainThreadEnvironment(). 22 23 Tests: fast/workers/worker-floating-point.html 24 js/floating-point-denormalized.html 25 26 * WebCore.exp.in: 27 * WebCore.xcodeproj/project.pbxproj: 28 * platform/ios/wak/FloatingPointEnvironment.cpp: Added. 29 (WebCore::FloatingPointEnvironment::env): 30 (WebCore::FloatingPointEnvironment::FloatingPointEnvironment): 31 (WebCore::FloatingPointEnvironment::enableDenormalSupport): 32 (WebCore::FloatingPointEnvironment::saveMainThreadEnvironment): 33 (WebCore::FloatingPointEnvironment::propagateMainThreadEnvironment): 34 * platform/ios/wak/FloatingPointEnvironment.h: Added. 35 * platform/ios/wak/WebCoreThread.h: 36 * platform/ios/wak/WebCoreThread.mm: 37 (RunWebThread): 38 (StartWebThread): 39 * workers/WorkerThread.cpp: 40 (WebCore::WorkerThread::workerThread): 41 1 42 2014-05-12 Dirk Schulze <krit@webkit.org> 2 43 -
trunk/Source/WebCore/WebCore.exp.in
r168668 r168676 2583 2583 __ZN7WebCore23characterBeforePositionERKNS_15VisiblePositionE 2584 2584 __ZN7WebCore24DocumentMarkerController14markersInRangeEPNS_5RangeENS_14DocumentMarker11MarkerTypesE 2585 __ZN7WebCore24FloatingPointEnvironment21enableDenormalSupportEv 2586 __ZN7WebCore24FloatingPointEnvironment25saveMainThreadEnvironmentEv 2587 __ZN7WebCore24FloatingPointEnvironment6sharedEv 2585 2588 __ZN7WebCore24acquireLineBreakIteratorEN3WTF10StringViewERKNS0_12AtomicStringEPKtj 2586 2589 __ZN7WebCore24createTemporaryDirectoryEP8NSString -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r168647 r168676 6546 6546 FE4AADEF16D2C37400026FFC /* AbstractSQLStatementBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = FE4AADED16D2C37400026FFC /* AbstractSQLStatementBackend.h */; settings = {ATTRIBUTES = (Private, ); }; }; 6547 6547 FE6938B61045D67E008EABB6 /* EventHandlerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */; }; 6548 FE699871192087E7006936BD /* FloatingPointEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE69986F192087E7006936BD /* FloatingPointEnvironment.cpp */; }; 6549 FE699872192087E7006936BD /* FloatingPointEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = FE699870192087E7006936BD /* FloatingPointEnvironment.h */; settings = {ATTRIBUTES = (Private, ); }; }; 6548 6550 FE6F6AAF169E057500FC30A2 /* DatabaseBackendContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE6F6AAD169E057500FC30A2 /* DatabaseBackendContext.cpp */; }; 6549 6551 FE6F6AB0169E057500FC30A2 /* DatabaseBackendContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6F6AAE169E057500FC30A2 /* DatabaseBackendContext.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 14026 14028 FE4AADED16D2C37400026FFC /* AbstractSQLStatementBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractSQLStatementBackend.h; sourceTree = "<group>"; }; 14027 14029 FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventHandlerIOS.mm; sourceTree = "<group>"; }; 14030 FE69986F192087E7006936BD /* FloatingPointEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FloatingPointEnvironment.cpp; path = ios/wak/FloatingPointEnvironment.cpp; sourceTree = "<group>"; }; 14031 FE699870192087E7006936BD /* FloatingPointEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FloatingPointEnvironment.h; path = ios/wak/FloatingPointEnvironment.h; sourceTree = "<group>"; }; 14028 14032 FE6F6AAD169E057500FC30A2 /* DatabaseBackendContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseBackendContext.cpp; sourceTree = "<group>"; }; 14029 14033 FE6F6AAE169E057500FC30A2 /* DatabaseBackendContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseBackendContext.h; sourceTree = "<group>"; }; … … 18143 18147 isa = PBXGroup; 18144 18148 children = ( 18149 FE69986F192087E7006936BD /* FloatingPointEnvironment.cpp */, 18150 FE699870192087E7006936BD /* FloatingPointEnvironment.h */, 18145 18151 A148328C187F508700DA63A6 /* WAKAppKitStubs.h */, 18146 18152 A148328D187F508700DA63A6 /* WAKAppKitStubs.m */, … … 22966 22972 buildActionMask = 2147483647; 22967 22973 files = ( 22974 FE699872192087E7006936BD /* FloatingPointEnvironment.h in Headers */, 22968 22975 E1D31CDD19196020001005A3 /* BlobDataFileReference.h in Headers */, 22969 22976 FE115FAB167988CD00249134 /* AbstractDatabaseServer.h in Headers */, … … 25074 25081 E12719C70EEEC16800F61213 /* NavigatorBase.h in Headers */, 25075 25082 9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */, 25076 078E091A17D14D1C00420AA1 /* Navigator MediaStream.h in Headers */,25083 078E091A17D14D1C00420AA1 /* NavigatorUserMedia.h in Headers */, 25077 25084 078E091B17D14D1C00420AA1 /* NavigatorUserMediaError.h in Headers */, 25078 25085 078E091C17D14D1C00420AA1 /* NavigatorUserMediaErrorCallback.h in Headers */, … … 27540 27547 0F43C85F189E15A600019AE2 /* JSPerformanceTiming.cpp in Sources */, 27541 27548 E44613A40CD6331000FADA75 /* HTMLMediaElement.cpp in Sources */, 27549 FE699871192087E7006936BD /* FloatingPointEnvironment.cpp in Sources */, 27542 27550 0779BF0D18453168000B6AE7 /* HTMLMediaElementMediaStream.cpp in Sources */, 27543 27551 07FE99DC18807A7D00256648 /* HTMLMediaSession.cpp in Sources */, -
trunk/Source/WebCore/platform/ios/wak/WebCoreThread.h
r161603 r168676 30 30 31 31 #import <CoreGraphics/CoreGraphics.h> 32 #import <fenv.h>33 32 34 33 #if defined(__cplusplus) … … 41 40 42 41 extern volatile bool webThreadShouldYield; 43 44 extern fenv_t mainThreadFEnv;45 42 46 43 #ifdef __OBJC__ -
trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm
r165662 r168676 29 29 #if PLATFORM(IOS) 30 30 31 #import "FloatingPointEnvironment.h" 31 32 #import "JSDOMWindowBase.h" 32 33 #import "ThreadGlobalData.h" … … 102 103 static BOOL webThreadStarted; 103 104 static unsigned webThreadLockCount; 104 fenv_t mainThreadFEnv;105 105 106 106 static NSAutoreleasePoolMark savedAutoreleasePoolMark; … … 644 644 void *RunWebThread(void *arg) 645 645 { 646 // Propagate the mainThread's fenv to the web thread. 647 fesetenv(&mainThreadFEnv); 646 FloatingPointEnvironment::shared().propagateMainThreadEnvironment(); 648 647 649 648 UNUSED_PARAM(arg); … … 760 759 761 760 // Propagate the mainThread's fenv to workers & the web thread. 762 fegetenv(&mainThreadFEnv);761 FloatingPointEnvironment::shared().saveMainThreadEnvironment(); 763 762 764 763 pthread_create(&webThread, &tattr, RunWebThread, NULL); -
trunk/Source/WebCore/workers/WorkerThread.cpp
r168600 r168676 46 46 47 47 #if PLATFORM(IOS) 48 #include "FloatingPointEnvironment.h" 48 49 #include "WebCoreThread.h" 49 50 #endif … … 154 155 // Propagate the mainThread's fenv to workers. 155 156 #if PLATFORM(IOS) 156 fesetenv(&mainThreadFEnv);157 FloatingPointEnvironment::shared().propagateMainThreadEnvironment(); 157 158 #endif 158 159 -
trunk/Source/WebKit2/ChangeLog
r168675 r168676 1 2014-05-12 Mark Lam <mark.lam@apple.com> 2 3 WebKit2 on iOS needs to capture the main thread's floating point environment. 4 <https://webkit.org/b/132755> 5 6 Reviewed by Geoffrey Garen. 7 8 * Shared/mac/ChildProcessMac.mm: 9 (WebKit::ChildProcess::platformInitialize): 10 - Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize 11 the ARMv7 FP env to support denormalized numbers. 12 - Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread 13 fp env. 14 1 15 2014-05-12 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 16 -
trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm
r166047 r168676 37 37 #import <sysexits.h> 38 38 39 #if PLATFORM(IOS) 40 #import <WebCore/FloatingPointEnvironment.h> 41 #endif 42 39 43 // We have to #undef __APPLE_API_PRIVATE to prevent sandbox.h from looking for a header file that does not exist (<rdar://problem/9679211>). 40 44 #undef __APPLE_API_PRIVATE … … 89 93 #if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 90 94 initializeTimerCoalescingPolicy(); 95 #endif 96 #if PLATFORM(IOS) 97 FloatingPointEnvironment& floatingPointEnvironment = FloatingPointEnvironment::shared(); 98 floatingPointEnvironment.enableDenormalSupport(); 99 floatingPointEnvironment.saveMainThreadEnvironment(); 91 100 #endif 92 101
Note: See TracChangeset
for help on using the changeset viewer.