diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2016-03-01 08:58:05 -0800 |
---|---|---|
committer | Ali Sheikh <ofrobots@lemonhope.roam.corp.google.com> | 2016-03-03 20:35:20 -0800 |
commit | 069e02ab47656b3efd1b6829c65856b2e1c2d1db (patch) | |
tree | eb643e0a2e88fd64bb9fc927423458d2ae96c2db /deps/v8/src/startup-data-util.cc | |
parent | 8938355398c79f583a468284b768652d12ba9bc9 (diff) | |
download | android-node-v8-069e02ab47656b3efd1b6829c65856b2e1c2d1db.tar.gz android-node-v8-069e02ab47656b3efd1b6829c65856b2e1c2d1db.tar.bz2 android-node-v8-069e02ab47656b3efd1b6829c65856b2e1c2d1db.zip |
deps: upgrade to V8 4.9.385.18
Pick up the current branch head for V8 4.9
https://github.com/v8/v8/commit/1ecba0f
PR-URL: https://github.com/nodejs/node/pull/4722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'deps/v8/src/startup-data-util.cc')
-rw-r--r-- | deps/v8/src/startup-data-util.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/deps/v8/src/startup-data-util.cc b/deps/v8/src/startup-data-util.cc index 92c4b5b3e9..4e0ad97a0c 100644 --- a/deps/v8/src/startup-data-util.cc +++ b/deps/v8/src/startup-data-util.cc @@ -9,6 +9,7 @@ #include "src/base/logging.h" #include "src/base/platform/platform.h" +#include "src/utils.h" namespace v8 { @@ -44,10 +45,13 @@ void Load(const char* blob_file, v8::StartupData* startup_data, void (*setter_fn)(v8::StartupData*)) { ClearStartupData(startup_data); - if (!blob_file) return; + CHECK(blob_file); FILE* file = fopen(blob_file, "rb"); - if (!file) return; + if (!file) { + PrintF(stderr, "Failed to open startup resource '%s'.\n", blob_file); + return; + } fseek(file, 0, SEEK_END); startup_data->raw_size = static_cast<int>(ftell(file)); @@ -58,7 +62,11 @@ void Load(const char* blob_file, v8::StartupData* startup_data, 1, startup_data->raw_size, file)); fclose(file); - if (startup_data->raw_size == read_size) (*setter_fn)(startup_data); + if (startup_data->raw_size == read_size) { + (*setter_fn)(startup_data); + } else { + PrintF(stderr, "Corrupted startup resource '%s'.\n", blob_file); + } } |