Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: trunk/Source/bindings/v8/SerializedScriptValue.cpp

Issue 19982008: Revert 154802 "Don't use Vector<UChar> to build strings" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | trunk/Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/bindings/v8/SerializedScriptValue.cpp
===================================================================
--- trunk/Source/bindings/v8/SerializedScriptValue.cpp (revision 154824)
+++ trunk/Source/bindings/v8/SerializedScriptValue.cpp (working copy)
@@ -76,7 +76,6 @@
#include "wtf/Uint8Array.h"
#include "wtf/Uint8ClampedArray.h"
#include "wtf/Vector.h"
-#include "wtf/text/StringBuffer.h"
#include "wtf/text/StringUTF8Adaptor.h"
// FIXME: consider crashing in debug mode on deserialization errors
@@ -2251,9 +2250,9 @@
// Decode wire data from big endian to host byte order.
ASSERT(!(data.size() % sizeof(UChar)));
size_t length = data.size() / sizeof(UChar);
- StringBuffer<UChar> buffer(length);
+ Vector<UChar> buffer(length);
const UChar* src = reinterpret_cast<const UChar*>(data.data());
- UChar* dst = buffer.characters();
+ UChar* dst = buffer.data();
for (size_t i = 0; i < length; i++)
dst[i] = ntohs(src[i]);
« no previous file with comments | « no previous file | trunk/Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698