From a94275402997c11dd2e778633dacf4b7e630a35d Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 22 Oct 2010 13:02:20 +0100 Subject: Merge WebKit at r70209: Initial merge by Git Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e --- JavaScriptCore/wtf/RandomNumber.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'JavaScriptCore/wtf/RandomNumber.cpp') diff --git a/JavaScriptCore/wtf/RandomNumber.cpp b/JavaScriptCore/wtf/RandomNumber.cpp index b20652b..7a9b6a8 100644 --- a/JavaScriptCore/wtf/RandomNumber.cpp +++ b/JavaScriptCore/wtf/RandomNumber.cpp @@ -44,6 +44,8 @@ extern "C" { #include #include #include +#include +#include #endif namespace WTF { @@ -97,12 +99,8 @@ double randomNumber() return static_cast(fullRandom)/static_cast(1LL << 53); #elif PLATFORM(BREWMP) uint32_t bits; - ISource* randomSource; - - IShell* shell = reinterpret_cast(GETAPPINSTANCE())->m_pIShell; - ISHELL_CreateInstance(shell, AEECLSID_RANDOM, reinterpret_cast(&randomSource)); - ISOURCE_Read(randomSource, reinterpret_cast(&bits), 4); - ISOURCE_Release(randomSource); + PlatformRefPtr randomSource = createRefPtrInstance(AEECLSID_RANDOM); + ISOURCE_Read(randomSource.get(), reinterpret_cast(&bits), 4); return static_cast(bits) / (static_cast(std::numeric_limits::max()) + 1.0); #else -- cgit v1.1