OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 // Defined when linking against shared lib on Windows. | 6 // Defined when linking against shared lib on Windows. |
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) | 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) |
8 #define V8_SHARED | 8 #define V8_SHARED |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 | 1618 |
1619 FILE* file = fopen(blob_file, "rb"); | 1619 FILE* file = fopen(blob_file, "rb"); |
1620 if (!file) | 1620 if (!file) |
1621 return; | 1621 return; |
1622 | 1622 |
1623 fseek(file, 0, SEEK_END); | 1623 fseek(file, 0, SEEK_END); |
1624 startup_data->raw_size = ftell(file); | 1624 startup_data->raw_size = ftell(file); |
1625 rewind(file); | 1625 rewind(file); |
1626 | 1626 |
1627 startup_data->data = new char[startup_data->raw_size]; | 1627 startup_data->data = new char[startup_data->raw_size]; |
1628 startup_data->compressed_size = fread( | 1628 startup_data->compressed_size = |
1629 const_cast<char*>(startup_data->data), 1, startup_data->raw_size, | 1629 static_cast<int>(fread(const_cast<char*>(startup_data->data), 1, |
1630 file); | 1630 startup_data->raw_size, file)); |
1631 fclose(file); | 1631 fclose(file); |
1632 | 1632 |
1633 if (startup_data->raw_size == startup_data->compressed_size) | 1633 if (startup_data->raw_size == startup_data->compressed_size) |
1634 (*setter_fn)(startup_data); | 1634 (*setter_fn)(startup_data); |
1635 } | 1635 } |
1636 | 1636 |
1637 v8::StartupData natives_; | 1637 v8::StartupData natives_; |
1638 v8::StartupData snapshot_; | 1638 v8::StartupData snapshot_; |
1639 | 1639 |
1640 // Disallow copy & assign. | 1640 // Disallow copy & assign. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 } | 1765 } |
1766 | 1766 |
1767 } // namespace v8 | 1767 } // namespace v8 |
1768 | 1768 |
1769 | 1769 |
1770 #ifndef GOOGLE3 | 1770 #ifndef GOOGLE3 |
1771 int main(int argc, char* argv[]) { | 1771 int main(int argc, char* argv[]) { |
1772 return v8::Shell::Main(argc, argv); | 1772 return v8::Shell::Main(argc, argv); |
1773 } | 1773 } |
1774 #endif | 1774 #endif |
OLD | NEW |