| 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>;
|
|
|
|
|