[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:13:42 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9f13c2e2fa91e8d8e7c2afa688b2f17eae5636cf
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 5 17:34:25 2010 +0000
2010-10-05 Kwang Yul Seo <skyul at company100.net>
Reviewed by Kent Tamura.
[BREWMP] Use PlatformRefPtr in randomNumber
https://bugs.webkit.org/show_bug.cgi?id=46989
Use PlatformRefPtr to free memory automatically.
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 242c439..480851f 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-05 Kwang Yul Seo <skyul at company100.net>
+
+ Reviewed by Kent Tamura.
+
+ [BREWMP] Use PlatformRefPtr in randomNumber
+ https://bugs.webkit.org/show_bug.cgi?id=46989
+
+ Use PlatformRefPtr to free memory automatically.
+
+ * wtf/RandomNumber.cpp:
+ (WTF::randomNumber):
+
2010-10-05 Oliver Hunt <oliver at apple.com>
Reviewed by Darin Adler.
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 <AEEAppGen.h>
#include <AEESource.h>
#include <AEEStdLib.h>
+#include <wtf/brew/RefPtrBrew.h>
+#include <wtf/brew/ShellBrew.h>
#endif
namespace WTF {
@@ -97,12 +99,8 @@ double randomNumber()
return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53);
#elif PLATFORM(BREWMP)
uint32_t bits;
- ISource* randomSource;
-
- IShell* shell = reinterpret_cast<AEEApplet*>(GETAPPINSTANCE())->m_pIShell;
- ISHELL_CreateInstance(shell, AEECLSID_RANDOM, reinterpret_cast<void**>(&randomSource));
- ISOURCE_Read(randomSource, reinterpret_cast<char*>(&bits), 4);
- ISOURCE_Release(randomSource);
+ PlatformRefPtr<ISource> randomSource = createRefPtrInstance<ISource>(AEECLSID_RANDOM);
+ ISOURCE_Read(randomSource.get(), reinterpret_cast<char*>(&bits), 4);
return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
#else
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list