Remove v8::StartupData::compressed_size.
authoryangguo <yangguo@chromium.org>
Mon, 24 Nov 2014 16:14:26 +0000 (08:14 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 24 Nov 2014 16:14:34 +0000 (16:14 +0000)
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/739253006

Cr-Commit-Position: refs/heads/master@{#25487}

include/v8.h
src/d8.cc

index 21911b460db34b23e5f89a0b1beaa4e221a0f37c..ef01a5fdd9307cdfd2235aad70c95bdae3c23a0f 100644 (file)
@@ -5161,7 +5161,6 @@ class V8_EXPORT Isolate {
 class V8_EXPORT StartupData {
  public:
   const char* data;
-  int compressed_size;  // TODO(yangguo): remove this.
   int raw_size;
 };
 
index bf1a74bdf804f9538c8c03761dd04fff0b1e0305..e18f2da91d1a03ccdba7e5de40a00c3d86127f71 100644 (file)
--- 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_;