Changeset 69124 in webkit for trunk/JavaScriptCore/wtf/RandomNumber.cpp
- Timestamp:
- Oct 5, 2010, 10:34:25 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/RandomNumber.cpp
r60945 r69124 45 45 #include <AEESource.h> 46 46 #include <AEEStdLib.h> 47 #include <wtf/brew/RefPtrBrew.h> 48 #include <wtf/brew/ShellBrew.h> 47 49 #endif 48 50 … … 98 100 #elif PLATFORM(BREWMP) 99 101 uint32_t bits; 100 ISource* randomSource; 101 102 IShell* shell = reinterpret_cast<AEEApplet*>(GETAPPINSTANCE())->m_pIShell; 103 ISHELL_CreateInstance(shell, AEECLSID_RANDOM, reinterpret_cast<void**>(&randomSource)); 104 ISOURCE_Read(randomSource, reinterpret_cast<char*>(&bits), 4); 105 ISOURCE_Release(randomSource); 102 PlatformRefPtr<ISource> randomSource = createRefPtrInstance<ISource>(AEECLSID_RANDOM); 103 ISOURCE_Read(randomSource.get(), reinterpret_cast<char*>(&bits), 4); 106 104 107 105 return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
Note:
See TracChangeset
for help on using the changeset viewer.