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

Unified Diff: test/cctest/parsing/test-scanner-streams.cc

Issue 2759513002: Remove Factory::NewStringFromASCII method. (Closed)
Patch Set: Created 3 years, 9 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 | « src/wasm/wasm-objects.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/parsing/test-scanner-streams.cc
diff --git a/test/cctest/parsing/test-scanner-streams.cc b/test/cctest/parsing/test-scanner-streams.cc
index 06ae5fd1303479bb00459e43aa936a0202bd9b1c..7b621114fe5bc9812e5fdd6c3ec8eafe607c97e4 100644
--- a/test/cctest/parsing/test-scanner-streams.cc
+++ b/test/cctest/parsing/test-scanner-streams.cc
@@ -311,10 +311,10 @@ void TestCharacterStreams(const char* one_byte_source, unsigned length,
}
// 1-byte external string
- i::Vector<const char> one_byte_vector(one_byte_source,
- static_cast<int>(length));
+ i::Vector<const uint8_t> one_byte_vector =
+ i::OneByteVector(one_byte_source, static_cast<int>(length));
i::Handle<i::String> one_byte_string =
- factory->NewStringFromAscii(one_byte_vector).ToHandleChecked();
+ factory->NewStringFromOneByte(one_byte_vector).ToHandleChecked();
{
TestExternalOneByteResource one_byte_resource(one_byte_source, length);
i::Handle<i::String> ext_one_byte_string(
@@ -350,10 +350,8 @@ void TestCharacterStreams(const char* one_byte_source, unsigned length,
// 1-byte streaming stream, single + many chunks.
{
- const uint8_t* data =
- reinterpret_cast<const uint8_t*>(one_byte_vector.begin());
- const uint8_t* data_end =
- reinterpret_cast<const uint8_t*>(one_byte_vector.end());
+ const uint8_t* data = one_byte_vector.begin();
+ const uint8_t* data_end = one_byte_vector.end();
ChunkSource single_chunk(data, data_end - data, false);
std::unique_ptr<i::Utf16CharacterStream> one_byte_streaming_stream(
@@ -372,10 +370,8 @@ void TestCharacterStreams(const char* one_byte_source, unsigned length,
// UTF-8 streaming stream, single + many chunks.
{
- const uint8_t* data =
- reinterpret_cast<const uint8_t*>(one_byte_vector.begin());
- const uint8_t* data_end =
- reinterpret_cast<const uint8_t*>(one_byte_vector.end());
+ const uint8_t* data = one_byte_vector.begin();
+ const uint8_t* data_end = one_byte_vector.end();
ChunkSource chunks(data, data_end - data, false);
std::unique_ptr<i::Utf16CharacterStream> utf8_streaming_stream(
i::ScannerStream::For(&chunks, v8::ScriptCompiler::StreamedSource::UTF8,
« no previous file with comments | « src/wasm/wasm-objects.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698