Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index bf1a74bdf804f9538c8c03761dd04fff0b1e0305..e18f2da91d1a03ccdba7e5de40a00c3d86127f71 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -1570,7 +1570,6 @@ class StartupDataHandler { |
v8::StartupData* startup_data, |
void (*setter_fn)(v8::StartupData*)) { |
startup_data->data = NULL; |
- startup_data->compressed_size = 0; |
startup_data->raw_size = 0; |
if (!blob_file) |
@@ -1585,13 +1584,12 @@ class StartupDataHandler { |
rewind(file); |
startup_data->data = new char[startup_data->raw_size]; |
- startup_data->compressed_size = |
+ int read_size = |
static_cast<int>(fread(const_cast<char*>(startup_data->data), 1, |
startup_data->raw_size, file)); |
fclose(file); |
- if (startup_data->raw_size == startup_data->compressed_size) |
- (*setter_fn)(startup_data); |
+ if (startup_data->raw_size == read_size) (*setter_fn)(startup_data); |
} |
v8::StartupData natives_; |