Commit 1a2a18b6 authored by yangguo's avatar yangguo Committed by Commit bot

Remove v8::StartupData::compressed_size.

R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25487}
parent 270dccf6
...@@ -5161,7 +5161,6 @@ class V8_EXPORT Isolate { ...@@ -5161,7 +5161,6 @@ class V8_EXPORT Isolate {
class V8_EXPORT StartupData { class V8_EXPORT StartupData {
public: public:
const char* data; const char* data;
int compressed_size; // TODO(yangguo): remove this.
int raw_size; int raw_size;
}; };
......
...@@ -1570,7 +1570,6 @@ class StartupDataHandler { ...@@ -1570,7 +1570,6 @@ class StartupDataHandler {
v8::StartupData* startup_data, v8::StartupData* startup_data,
void (*setter_fn)(v8::StartupData*)) { void (*setter_fn)(v8::StartupData*)) {
startup_data->data = NULL; startup_data->data = NULL;
startup_data->compressed_size = 0;
startup_data->raw_size = 0; startup_data->raw_size = 0;
if (!blob_file) if (!blob_file)
...@@ -1585,13 +1584,12 @@ class StartupDataHandler { ...@@ -1585,13 +1584,12 @@ class StartupDataHandler {
rewind(file); rewind(file);
startup_data->data = new char[startup_data->raw_size]; 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, static_cast<int>(fread(const_cast<char*>(startup_data->data), 1,
startup_data->raw_size, file)); startup_data->raw_size, file));
fclose(file); fclose(file);
if (startup_data->raw_size == startup_data->compressed_size) if (startup_data->raw_size == read_size) (*setter_fn)(startup_data);
(*setter_fn)(startup_data);
} }
v8::StartupData natives_; v8::StartupData natives_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment