summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore')
-rw-r--r--Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp4
-rw-r--r--Source/JavaScriptCore/wtf/FastMalloc.cpp9
2 files changed, 3 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp b/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp
index 4c49873..6fe4249 100644
--- a/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp
+++ b/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp
@@ -142,8 +142,6 @@ uint32_t ARC4RandomNumberGenerator::randomNumber()
{
#if ENABLE(JSC_MULTIPLE_THREADS)
MutexLocker locker(m_mutex);
-#else
- ASSERT(isMainThread());
#endif
m_count -= 4;
@@ -155,8 +153,6 @@ void ARC4RandomNumberGenerator::randomValues(void* buffer, size_t length)
{
#if ENABLE(JSC_MULTIPLE_THREADS)
MutexLocker locker(m_mutex);
-#else
- ASSERT(isMainThread());
#endif
unsigned char* result = reinterpret_cast<unsigned char*>(buffer);
diff --git a/Source/JavaScriptCore/wtf/FastMalloc.cpp b/Source/JavaScriptCore/wtf/FastMalloc.cpp
index 95a9aff..47238d5 100644
--- a/Source/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/Source/JavaScriptCore/wtf/FastMalloc.cpp
@@ -183,15 +183,12 @@ void* fastZeroedMalloc(size_t n)
char* fastStrDup(const char* src)
{
- int len = strlen(src) + 1;
+ size_t len = strlen(src) + 1;
char* dup = static_cast<char*>(fastMalloc(len));
-
- if (dup)
- memcpy(dup, src, len);
-
+ memcpy(dup, src, len);
return dup;
}
-
+
TryMallocReturnValue tryFastZeroedMalloc(size_t n)
{
void* result;