| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 5228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5239 | 5239 |
| 5240 class V8_EXPORT Locker { | 5240 class V8_EXPORT Locker { |
| 5241 public: | 5241 public: |
| 5242 /** | 5242 /** |
| 5243 * Initialize Locker for a given Isolate. | 5243 * Initialize Locker for a given Isolate. |
| 5244 */ | 5244 */ |
| 5245 V8_INLINE explicit Locker(Isolate* isolate) { Initialize(isolate); } | 5245 V8_INLINE explicit Locker(Isolate* isolate) { Initialize(isolate); } |
| 5246 | 5246 |
| 5247 ~Locker(); | 5247 ~Locker(); |
| 5248 | 5248 |
| 5249 /** | 5249 V8_DEPRECATED("This will be remvoed.", |
| 5250 * Start preemption. | 5250 static void StartPreemption(Isolate *isolate, int every_n_ms)); |
| 5251 * | |
| 5252 * When preemption is started, a timer is fired every n milliseconds | |
| 5253 * that will switch between multiple threads that are in contention | |
| 5254 * for the V8 lock. | |
| 5255 */ | |
| 5256 static void StartPreemption(Isolate* isolate, int every_n_ms); | |
| 5257 | 5251 |
| 5258 /** | 5252 V8_DEPRECATED("This will be removed", |
| 5259 * Stop preemption. | 5253 static void StopPreemption(Isolate* isolate)); |
| 5260 */ | |
| 5261 static void StopPreemption(Isolate* isolate); | |
| 5262 | 5254 |
| 5263 /** | 5255 /** |
| 5264 * Returns whether or not the locker for a given isolate, is locked by the | 5256 * Returns whether or not the locker for a given isolate, is locked by the |
| 5265 * current thread. | 5257 * current thread. |
| 5266 */ | 5258 */ |
| 5267 static bool IsLocked(Isolate* isolate); | 5259 static bool IsLocked(Isolate* isolate); |
| 5268 | 5260 |
| 5269 /** | 5261 /** |
| 5270 * Returns whether v8::Locker is being used by this V8 instance. | 5262 * Returns whether v8::Locker is being used by this V8 instance. |
| 5271 */ | 5263 */ |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6547 */ | 6539 */ |
| 6548 | 6540 |
| 6549 | 6541 |
| 6550 } // namespace v8 | 6542 } // namespace v8 |
| 6551 | 6543 |
| 6552 | 6544 |
| 6553 #undef TYPE_CHECK | 6545 #undef TYPE_CHECK |
| 6554 | 6546 |
| 6555 | 6547 |
| 6556 #endif // V8_H_ | 6548 #endif // V8_H_ |
| OLD | NEW |