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

Unified Diff: test/cctest/test-api.cc

Issue 225753004: Remove the PreCompile API and ScriptData. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 8 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/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index b25b72bcac0da656a3e0426ec6cf195ea3713cc8..778bf49597022ff6b6d405430dbb5a40d50ddc0c 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -14841,8 +14841,7 @@ TEST(PreCompileSerialization) {
i::OS::MemCopy(serialized_data, cd->data, cd->length);
// Deserialize.
- v8::ScriptData* deserialized =
- v8::ScriptData::New(serialized_data, cd->length);
+ i::ScriptData* deserialized = i::ScriptData::New(serialized_data, cd->length);
// Verify that the original is the same as the deserialized.
CHECK_EQ(cd->length, deserialized->Length());
@@ -14858,7 +14857,7 @@ TEST(PreCompileDeserializationError) {
v8::V8::Initialize();
const char* data = "DONT CARE";
int invalid_size = 3;
- v8::ScriptData* sd = v8::ScriptData::New(data, invalid_size);
+ i::ScriptData* sd = i::ScriptData::New(data, invalid_size);
CHECK_EQ(0, sd->Length());
@@ -14883,10 +14882,10 @@ TEST(CompileWithInvalidCachedData) {
// want to modify the data before passing it back.
const v8::ScriptCompiler::CachedData* cd = source.GetCachedData();
// ScriptData does not take ownership of the buffers passed to it.
- v8::ScriptData* sd =
- v8::ScriptData::New(reinterpret_cast<const char*>(cd->data), cd->length);
+ i::ScriptData* sd =
+ i::ScriptData::New(reinterpret_cast<const char*>(cd->data), cd->length);
CHECK(!sd->HasError());
- // ScriptDataImpl private implementation details
+ // ScriptData private implementation details
const int kHeaderSize = i::PreparseDataConstants::kHeaderSize;
const int kFunctionEntrySize = i::FunctionEntry::kSize;
const int kFunctionEntryStartOffset = 0;
@@ -14923,7 +14922,7 @@ TEST(CompileWithInvalidCachedData) {
// will not be found when searching for it by position and we should fall
// back on eager compilation.
// ScriptData does not take ownership of the buffers passed to it.
- sd = v8::ScriptData::New(reinterpret_cast<const char*>(cd->data), cd->length);
+ sd = i::ScriptData::New(reinterpret_cast<const char*>(cd->data), cd->length);
sd_data = reinterpret_cast<unsigned*>(const_cast<char*>(sd->Data()));
sd_data[kHeaderSize + 1 * kFunctionEntrySize + kFunctionEntryStartOffset] =
200;
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698