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

Unified Diff: src/natives-external.cc

Issue 791723004: Reland "Use same blob format for internal and external snapshots." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 6 years 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/mksnapshot.cc ('k') | src/serialize.h » ('j') | src/snapshot-external.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/natives-external.cc
diff --git a/src/natives-external.cc b/src/natives-external.cc
index cfa00bc1345a1cb746d8946ceeb272cf7d444eeb..43120912879525cba365e8196b9fbb18fea9cadb 100644
--- a/src/natives-external.cc
+++ b/src/natives-external.cc
@@ -10,6 +10,11 @@
#include "src/snapshot-source-sink.h"
#include "src/vector.h"
+#ifndef V8_USE_EXTERNAL_STARTUP_DATA
+#error natives-external.cc is used only for the external snapshot build.
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
+
+
namespace v8 {
namespace internal {
@@ -142,8 +147,7 @@ void SetNativesFromFile(StartupData* natives_blob) {
DCHECK(natives_blob->data);
DCHECK(natives_blob->raw_size > 0);
- SnapshotByteSource bytes(reinterpret_cast<const byte*>(natives_blob->data),
- natives_blob->raw_size);
+ SnapshotByteSource bytes(natives_blob->data, natives_blob->raw_size);
NativesHolder<CORE>::set(NativesStore::MakeFromScriptsSource(&bytes));
NativesHolder<EXPERIMENTAL>::set(NativesStore::MakeFromScriptsSource(&bytes));
DCHECK(!bytes.HasMore());
@@ -188,7 +192,7 @@ Vector<const char> NativesCollection<type>::GetScriptsSource() {
// The compiler can't 'see' all uses of the static methods and hence
-// my chose to elide them. This we'll explicitly instantiate these.
+// my choice to elide them. This we'll explicitly instantiate these.
template class NativesCollection<CORE>;
template class NativesCollection<EXPERIMENTAL>;
« no previous file with comments | « src/mksnapshot.cc ('k') | src/serialize.h » ('j') | src/snapshot-external.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698