OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 /** | 418 /** |
419 * Creates a new handle with the given value. | 419 * Creates a new handle with the given value. |
420 */ | 420 */ |
421 static void** CreateHandle(void* value); | 421 static void** CreateHandle(void* value); |
422 | 422 |
423 private: | 423 private: |
424 // Make it impossible to create heap-allocated or illegal handle | 424 // Make it impossible to create heap-allocated or illegal handle |
425 // scopes by disallowing certain operations. | 425 // scopes by disallowing certain operations. |
426 HandleScope(const HandleScope&); | 426 HandleScope(const HandleScope&); |
427 void operator=(const HandleScope&); | 427 void operator=(const HandleScope&); |
| 428 #ifndef BUILDING_V8C // C bindings need to be able to heap-allocate. |
428 void* operator new(size_t size); | 429 void* operator new(size_t size); |
429 void operator delete(void*, size_t); | 430 void operator delete(void*, size_t); |
| 431 #endif |
430 | 432 |
431 class EXPORT Data { | 433 class EXPORT Data { |
432 public: | 434 public: |
433 int extensions; | 435 int extensions; |
434 void** next; | 436 void** next; |
435 void** limit; | 437 void** limit; |
436 inline void Initialize() { | 438 inline void Initialize() { |
437 extensions = -1; | 439 extensions = -1; |
438 next = limit = NULL; | 440 next = limit = NULL; |
439 } | 441 } |
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2393 | 2395 |
2394 } // namespace v8 | 2396 } // namespace v8 |
2395 | 2397 |
2396 | 2398 |
2397 #undef EXPORT | 2399 #undef EXPORT |
2398 #undef EXPORT_INLINE | 2400 #undef EXPORT_INLINE |
2399 #undef TYPE_CHECK | 2401 #undef TYPE_CHECK |
2400 | 2402 |
2401 | 2403 |
2402 #endif // V8_H_ | 2404 #endif // V8_H_ |
OLD | NEW |