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 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 } | 1155 } |
1156 | 1156 |
1157 interpreter::Interpreter* interpreter() const { return interpreter_; } | 1157 interpreter::Interpreter* interpreter() const { return interpreter_; } |
1158 | 1158 |
1159 base::AccountingAllocator* allocator() { return allocator_; } | 1159 base::AccountingAllocator* allocator() { return allocator_; } |
1160 | 1160 |
1161 bool IsInAnyContext(Object* object, uint32_t index); | 1161 bool IsInAnyContext(Object* object, uint32_t index); |
1162 | 1162 |
1163 void SetRAILMode(RAILMode rail_mode); | 1163 void SetRAILMode(RAILMode rail_mode); |
1164 | 1164 |
| 1165 void IsolateInForegroundNotification(); |
| 1166 |
| 1167 void IsolateInBackgroundNotification(); |
| 1168 |
| 1169 bool IsIsolateInBackground() { return is_isolate_in_background_; } |
| 1170 |
1165 protected: | 1171 protected: |
1166 explicit Isolate(bool enable_serializer); | 1172 explicit Isolate(bool enable_serializer); |
1167 bool IsArrayOrObjectPrototype(Object* object); | 1173 bool IsArrayOrObjectPrototype(Object* object); |
1168 | 1174 |
1169 private: | 1175 private: |
1170 friend struct GlobalState; | 1176 friend struct GlobalState; |
1171 friend struct InitializeGlobalState; | 1177 friend struct InitializeGlobalState; |
1172 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, | 1178 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, |
1173 const char* name); | 1179 const char* name); |
1174 | 1180 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 | 1352 |
1347 // True if fatal error has been signaled for this isolate. | 1353 // True if fatal error has been signaled for this isolate. |
1348 bool has_fatal_error_; | 1354 bool has_fatal_error_; |
1349 | 1355 |
1350 // True if this isolate was initialized from a snapshot. | 1356 // True if this isolate was initialized from a snapshot. |
1351 bool initialized_from_snapshot_; | 1357 bool initialized_from_snapshot_; |
1352 | 1358 |
1353 // True if ES2015 tail call elimination feature is enabled. | 1359 // True if ES2015 tail call elimination feature is enabled. |
1354 bool is_tail_call_elimination_enabled_; | 1360 bool is_tail_call_elimination_enabled_; |
1355 | 1361 |
| 1362 // True if the isolate is in background. This flag is used |
| 1363 // to prioritize between memory usage and latency. |
| 1364 bool is_isolate_in_background_; |
| 1365 |
1356 // Time stamp at initialization. | 1366 // Time stamp at initialization. |
1357 double time_millis_at_init_; | 1367 double time_millis_at_init_; |
1358 | 1368 |
1359 #ifdef DEBUG | 1369 #ifdef DEBUG |
1360 // A static array of histogram info for each type. | 1370 // A static array of histogram info for each type. |
1361 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1371 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
1362 JSObject::SpillInformation js_spill_information_; | 1372 JSObject::SpillInformation js_spill_information_; |
1363 #endif | 1373 #endif |
1364 | 1374 |
1365 Debug* debug_; | 1375 Debug* debug_; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1667 | 1677 |
1668 EmbeddedVector<char, 128> filename_; | 1678 EmbeddedVector<char, 128> filename_; |
1669 FILE* file_; | 1679 FILE* file_; |
1670 int scope_depth_; | 1680 int scope_depth_; |
1671 }; | 1681 }; |
1672 | 1682 |
1673 } // namespace internal | 1683 } // namespace internal |
1674 } // namespace v8 | 1684 } // namespace v8 |
1675 | 1685 |
1676 #endif // V8_ISOLATE_H_ | 1686 #endif // V8_ISOLATE_H_ |
OLD | NEW |