| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium 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 #ifndef GIN_PUBLIC_ISOLATE_HOLDER_H_ | 5 #ifndef GIN_PUBLIC_ISOLATE_HOLDER_H_ |
| 6 #define GIN_PUBLIC_ISOLATE_HOLDER_H_ | 6 #define GIN_PUBLIC_ISOLATE_HOLDER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "gin/gin_export.h" | 10 #include "gin/gin_export.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // MessageLoop's thread. | 47 // MessageLoop's thread. |
| 48 void AddRunMicrotasksObserver(); | 48 void AddRunMicrotasksObserver(); |
| 49 | 49 |
| 50 // This method should also only be called once, and on the MessageLoop's | 50 // This method should also only be called once, and on the MessageLoop's |
| 51 // thread. | 51 // thread. |
| 52 void RemoveRunMicrotasksObserver(); | 52 void RemoveRunMicrotasksObserver(); |
| 53 | 53 |
| 54 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 54 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 55 static bool LoadV8SnapshotFD(int natives_fd, int snapshot_fd); | 55 static bool LoadV8SnapshotFD(int natives_fd, int snapshot_fd); |
| 56 static bool LoadV8Snapshot(); | 56 static bool LoadV8Snapshot(); |
| 57 static bool LoadAndVerifyV8Snapshot(); |
| 57 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 58 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 58 static void GetV8ExternalSnapshotData(const char** natives_data_out, | 59 static void GetV8ExternalSnapshotData(const char** natives_data_out, |
| 59 int* natives_size_out, | 60 int* natives_size_out, |
| 60 const char** snapshot_data_out, | 61 const char** snapshot_data_out, |
| 61 int* snapshot_size_out); | 62 int* snapshot_size_out); |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 v8::Isolate* isolate_; | 65 v8::Isolate* isolate_; |
| 65 scoped_ptr<PerIsolateData> isolate_data_; | 66 scoped_ptr<PerIsolateData> isolate_data_; |
| 66 scoped_ptr<RunMicrotasksObserver> task_observer_; | 67 scoped_ptr<RunMicrotasksObserver> task_observer_; |
| 67 | 68 |
| 68 DISALLOW_COPY_AND_ASSIGN(IsolateHolder); | 69 DISALLOW_COPY_AND_ASSIGN(IsolateHolder); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace gin | 72 } // namespace gin |
| 72 | 73 |
| 73 #endif // GIN_PUBLIC_ISOLATE_HOLDER_H_ | 74 #endif // GIN_PUBLIC_ISOLATE_HOLDER_H_ |
| OLD | NEW |