| 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 4363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4374 */ | 4374 */ |
| 4375 class V8_EXPORT PersistentHandleVisitor { // NOLINT | 4375 class V8_EXPORT PersistentHandleVisitor { // NOLINT |
| 4376 public: | 4376 public: |
| 4377 virtual ~PersistentHandleVisitor() {} | 4377 virtual ~PersistentHandleVisitor() {} |
| 4378 virtual void VisitPersistentHandle(Persistent<Value>* value, | 4378 virtual void VisitPersistentHandle(Persistent<Value>* value, |
| 4379 uint16_t class_id) {} | 4379 uint16_t class_id) {} |
| 4380 }; | 4380 }; |
| 4381 | 4381 |
| 4382 | 4382 |
| 4383 /** | 4383 /** |
| 4384 * Asserts that no action is performed that could cause a handle's value | |
| 4385 * to be modified. Useful when otherwise unsafe handle operations need to | |
| 4386 * be performed. | |
| 4387 */ | |
| 4388 class V8_EXPORT AssertNoGCScope { | |
| 4389 #ifndef DEBUG | |
| 4390 // TODO(yangguo): remove isolate argument. | |
| 4391 V8_INLINE AssertNoGCScope(Isolate* isolate) {} | |
| 4392 #else | |
| 4393 AssertNoGCScope(Isolate* isolate); | |
| 4394 ~AssertNoGCScope(); | |
| 4395 private: | |
| 4396 void* disallow_heap_allocation_; | |
| 4397 #endif | |
| 4398 }; | |
| 4399 | |
| 4400 | |
| 4401 /** | |
| 4402 * Container class for static utility functions. | 4384 * Container class for static utility functions. |
| 4403 */ | 4385 */ |
| 4404 class V8_EXPORT V8 { | 4386 class V8_EXPORT V8 { |
| 4405 public: | 4387 public: |
| 4406 /** Set the callback to invoke in case of fatal errors. */ | 4388 /** Set the callback to invoke in case of fatal errors. */ |
| 4407 static void SetFatalErrorHandler(FatalErrorCallback that); | 4389 static void SetFatalErrorHandler(FatalErrorCallback that); |
| 4408 | 4390 |
| 4409 /** | 4391 /** |
| 4410 * Set the callback to invoke to check if code generation from | 4392 * Set the callback to invoke to check if code generation from |
| 4411 * strings should be allowed. | 4393 * strings should be allowed. |
| (...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6446 */ | 6428 */ |
| 6447 | 6429 |
| 6448 | 6430 |
| 6449 } // namespace v8 | 6431 } // namespace v8 |
| 6450 | 6432 |
| 6451 | 6433 |
| 6452 #undef TYPE_CHECK | 6434 #undef TYPE_CHECK |
| 6453 | 6435 |
| 6454 | 6436 |
| 6455 #endif // V8_H_ | 6437 #endif // V8_H_ |
| OLD | NEW |