]> git.saurik.com Git - apple/javascriptcore.git/commitdiff
JavaScriptCore-1218.34.tar.gz ios-711 v1218.34
authorApple <opensource@apple.com>
Sat, 14 Feb 2015 10:38:57 +0000 (10:38 +0000)
committerApple <opensource@apple.com>
Sat, 14 Feb 2015 10:38:57 +0000 (10:38 +0000)
runtime/JSStringJoiner.cpp

index 7e20d21959604b66fa37f85e07ec3d013d0fdafa..b6461c750850aedb4cafd0326f1e4f2c41e5253c 100644 (file)
@@ -102,13 +102,13 @@ JSValue JSStringJoiner::join(ExecState* exec)
     if (!m_strings.size())
         return jsEmptyString(exec);
 
-    Checked<size_t, RecordOverflow> separatorLength = m_separator.length();
+    Checked<unsigned, RecordOverflow> separatorLength = m_separator.length();
     // FIXME: add special cases of joinStrings() for (separatorLength == 0) and (separatorLength == 1).
     ASSERT(m_strings.size() > 0);
-    Checked<size_t, RecordOverflow> totalSeparactorsLength = separatorLength * (m_strings.size() - 1);
-    Checked<size_t, RecordOverflow> outputStringSize = totalSeparactorsLength + m_accumulatedStringsLength;
+    Checked<unsigned, RecordOverflow> totalSeparactorsLength = separatorLength * (m_strings.size() - 1);
+    Checked<unsigned, RecordOverflow> outputStringSize = totalSeparactorsLength + m_accumulatedStringsLength;
 
-    size_t finalSize;
+    unsigned finalSize;
     if (outputStringSize.safeGet(finalSize) == CheckedState::DidOverflow)
         return throwOutOfMemoryError(exec);