Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index ee8057920165ae7925129722abc3c1e845deaff9..d979e3a32af3cb8a2f1cd50b11d9969ec89158c2 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -394,6 +394,9 @@ enum CompressedStartupDataItems { |
kSnapshotContext, |
kLibraries, |
kExperimentalLibraries, |
+#if defined(ENABLE_I18N_SUPPORT) |
+ kI18NExtension, |
+#endif |
kCompressedStartupDataCount |
}; |
@@ -433,6 +436,17 @@ void V8::GetCompressedStartupData(StartupData* compressed_data) { |
exp_libraries_source.length(); |
compressed_data[kExperimentalLibraries].raw_size = |
i::ExperimentalNatives::GetRawScriptsSize(); |
+ |
+#if defined(ENABLE_I18N_SUPPORT) |
+ i::Vector<const ii:byte> i18n_extension_source = |
+ i::I18NNatvies::GetScriptsSource(); |
Nebojša Ćirić
2013/07/03 09:23:41
i::I18NNatives (misspelled).
|
+ 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 |
} |
@@ -462,6 +476,15 @@ void V8::SetDecompressedStartupData(StartupData* decompressed_data) { |
decompressed_data[kExperimentalLibraries].data, |
decompressed_data[kExperimentalLibraries].raw_size); |
i::ExperimentalNatives::SetRawScriptsSource(exp_libraries_source); |
+ |
+#if defined(ENABLE_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 |
} |