Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: gin/public/isolate_holder.h

Issue 944913002: Transfer v8 snapshot files as file descriptors to child processes on Posix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tidy up Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Microtasks each time a Task is completed. This method should be called 45 // Microtasks each time a Task is completed. This method should be called
46 // once, when a MessageLoop is created and it should be called on the 46 // once, when a MessageLoop is created and it should be called on the
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 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 54 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
55 static const int kV8SnapshotBasePathKey;
55 static const char kNativesFileName[]; 56 static const char kNativesFileName[];
56 static const char kSnapshotFileName[]; 57 static const char kSnapshotFileName[];
57 58
58 static bool LoadV8SnapshotFd(int natives_fd, 59 static bool LoadV8SnapshotFd(int natives_fd,
59 int64 natives_offset, 60 int64 natives_offset,
60 int64 natives_size, 61 int64 natives_size,
61 int snapshot_fd, 62 int snapshot_fd,
62 int64 snapshot_offset, 63 int64 snapshot_offset,
63 int64 snapshot_size); 64 int64 snapshot_size);
64 static bool LoadV8Snapshot(); 65 static bool LoadV8Snapshot();
65 #endif // V8_USE_EXTERNAL_STARTUP_DATA 66 #endif // V8_USE_EXTERNAL_STARTUP_DATA
66 static void GetV8ExternalSnapshotData(const char** natives_data_out, 67 static void GetV8ExternalSnapshotData(const char** natives_data_out,
67 int* natives_size_out, 68 int* natives_size_out,
68 const char** snapshot_data_out, 69 const char** snapshot_data_out,
69 int* snapshot_size_out); 70 int* snapshot_size_out);
70 71
71 private: 72 private:
72 v8::Isolate* isolate_; 73 v8::Isolate* isolate_;
73 scoped_ptr<PerIsolateData> isolate_data_; 74 scoped_ptr<PerIsolateData> isolate_data_;
74 scoped_ptr<RunMicrotasksObserver> task_observer_; 75 scoped_ptr<RunMicrotasksObserver> task_observer_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(IsolateHolder); 77 DISALLOW_COPY_AND_ASSIGN(IsolateHolder);
77 }; 78 };
78 79
79 } // namespace gin 80 } // namespace gin
80 81
81 #endif // GIN_PUBLIC_ISOLATE_HOLDER_H_ 82 #endif // GIN_PUBLIC_ISOLATE_HOLDER_H_
OLDNEW
« content/shell/browser/shell_content_browser_client.cc ('K') | « gin/isolate_holder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698