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

Unified Diff: src/api.cc

Issue 23414008: Revert "Snapshot i18n Javascript code" and "Fix mjsunit/debug-script after r16298". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 9aed956a4214e0238b3235a4635c4d6e04179f52..61cc5203e65531949270fbba813e1e819276a65a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -399,6 +399,9 @@ enum CompressedStartupDataItems {
kSnapshotContext,
kLibraries,
kExperimentalLibraries,
+#if defined(V8_I18N_SUPPORT)
+ kI18NExtension,
+#endif
kCompressedStartupDataCount
};
@@ -439,6 +442,17 @@ void V8::GetCompressedStartupData(StartupData* compressed_data) {
exp_libraries_source.length();
compressed_data[kExperimentalLibraries].raw_size =
i::ExperimentalNatives::GetRawScriptsSize();
+
+#if defined(V8_I18N_SUPPORT)
+ i::Vector<const ii:byte> i18n_extension_source =
+ i::I18NNatives::GetScriptsSource();
+ compressed_data[kI18NExtension].data =
+ reinterpret_cast<const char*>(i18n_extension_source.start());
+ compressed_data[kI18NExtension].compressed_size =
+ i18n_extension_source.length();
+ compressed_data[kI18NExtension].raw_size =
+ i::I18NNatives::GetRawScriptsSize();
+#endif
#endif
}
@@ -468,6 +482,15 @@ void V8::SetDecompressedStartupData(StartupData* decompressed_data) {
decompressed_data[kExperimentalLibraries].data,
decompressed_data[kExperimentalLibraries].raw_size);
i::ExperimentalNatives::SetRawScriptsSource(exp_libraries_source);
+
+#if defined(V8_I18N_SUPPORT)
+ ASSERT_EQ(i::I18NNatives::GetRawScriptsSize(),
+ decompressed_data[kI18NExtension].raw_size);
+ i::Vector<const char> i18n_extension_source(
+ decompressed_data[kI18NExtension].data,
+ decompressed_data[kI18NExtension].raw_size);
+ i::I18NNatives::SetRawScriptsSource(i18n_extension_source);
+#endif
#endif
}
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698