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

Side by Side Diff: include/v8.h

Issue 6577036: [Isolates] Merge from bleeding_edge to isolates, revisions 6100-6300. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « SConstruct ('k') | src/SConscript » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 V8EXPORT Local<Object> Clone(); 1646 V8EXPORT Local<Object> Clone();
1647 1647
1648 /** 1648 /**
1649 * Set the backing store of the indexed properties to be managed by the 1649 * Set the backing store of the indexed properties to be managed by the
1650 * embedding layer. Access to the indexed properties will follow the rules 1650 * embedding layer. Access to the indexed properties will follow the rules
1651 * spelled out in CanvasPixelArray. 1651 * spelled out in CanvasPixelArray.
1652 * Note: The embedding program still owns the data and needs to ensure that 1652 * Note: The embedding program still owns the data and needs to ensure that
1653 * the backing store is preserved while V8 has a reference. 1653 * the backing store is preserved while V8 has a reference.
1654 */ 1654 */
1655 V8EXPORT void SetIndexedPropertiesToPixelData(uint8_t* data, int length); 1655 V8EXPORT void SetIndexedPropertiesToPixelData(uint8_t* data, int length);
1656 bool HasIndexedPropertiesInPixelData(); 1656 V8EXPORT bool HasIndexedPropertiesInPixelData();
1657 uint8_t* GetIndexedPropertiesPixelData(); 1657 V8EXPORT uint8_t* GetIndexedPropertiesPixelData();
1658 int GetIndexedPropertiesPixelDataLength(); 1658 V8EXPORT int GetIndexedPropertiesPixelDataLength();
1659 1659
1660 /** 1660 /**
1661 * Set the backing store of the indexed properties to be managed by the 1661 * Set the backing store of the indexed properties to be managed by the
1662 * embedding layer. Access to the indexed properties will follow the rules 1662 * embedding layer. Access to the indexed properties will follow the rules
1663 * spelled out for the CanvasArray subtypes in the WebGL specification. 1663 * spelled out for the CanvasArray subtypes in the WebGL specification.
1664 * Note: The embedding program still owns the data and needs to ensure that 1664 * Note: The embedding program still owns the data and needs to ensure that
1665 * the backing store is preserved while V8 has a reference. 1665 * the backing store is preserved while V8 has a reference.
1666 */ 1666 */
1667 V8EXPORT void SetIndexedPropertiesToExternalArrayData( 1667 V8EXPORT void SetIndexedPropertiesToExternalArrayData(
1668 void* data, 1668 void* data,
1669 ExternalArrayType array_type, 1669 ExternalArrayType array_type,
1670 int number_of_elements); 1670 int number_of_elements);
1671 bool HasIndexedPropertiesInExternalArrayData(); 1671 V8EXPORT bool HasIndexedPropertiesInExternalArrayData();
1672 void* GetIndexedPropertiesExternalArrayData(); 1672 V8EXPORT void* GetIndexedPropertiesExternalArrayData();
1673 ExternalArrayType GetIndexedPropertiesExternalArrayDataType(); 1673 V8EXPORT ExternalArrayType GetIndexedPropertiesExternalArrayDataType();
1674 int GetIndexedPropertiesExternalArrayDataLength(); 1674 V8EXPORT int GetIndexedPropertiesExternalArrayDataLength();
1675 1675
1676 V8EXPORT static Local<Object> New(); 1676 V8EXPORT static Local<Object> New();
1677 static inline Object* Cast(Value* obj); 1677 static inline Object* Cast(Value* obj);
1678 private: 1678 private:
1679 V8EXPORT Object(); 1679 V8EXPORT Object();
1680 V8EXPORT static void CheckCast(Value* obj); 1680 V8EXPORT static void CheckCast(Value* obj);
1681 V8EXPORT Local<Value> CheckedGetInternalField(int index); 1681 V8EXPORT Local<Value> CheckedGetInternalField(int index);
1682 V8EXPORT void* SlowGetPointerFromInternalField(int index); 1682 V8EXPORT void* SlowGetPointerFromInternalField(int index);
1683 1683
1684 /** 1684 /**
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 * 2510 *
2511 * Instances of this class can be passed to v8::V8::HeapStatistics to 2511 * Instances of this class can be passed to v8::V8::HeapStatistics to
2512 * get heap statistics from V8. 2512 * get heap statistics from V8.
2513 */ 2513 */
2514 class V8EXPORT HeapStatistics { 2514 class V8EXPORT HeapStatistics {
2515 public: 2515 public:
2516 HeapStatistics(); 2516 HeapStatistics();
2517 size_t total_heap_size() { return total_heap_size_; } 2517 size_t total_heap_size() { return total_heap_size_; }
2518 size_t total_heap_size_executable() { return total_heap_size_executable_; } 2518 size_t total_heap_size_executable() { return total_heap_size_executable_; }
2519 size_t used_heap_size() { return used_heap_size_; } 2519 size_t used_heap_size() { return used_heap_size_; }
2520 size_t heap_size_limit() { return heap_size_limit_; }
2520 2521
2521 private: 2522 private:
2522 void set_total_heap_size(size_t size) { total_heap_size_ = size; } 2523 void set_total_heap_size(size_t size) { total_heap_size_ = size; }
2523 void set_total_heap_size_executable(size_t size) { 2524 void set_total_heap_size_executable(size_t size) {
2524 total_heap_size_executable_ = size; 2525 total_heap_size_executable_ = size;
2525 } 2526 }
2526 void set_used_heap_size(size_t size) { used_heap_size_ = size; } 2527 void set_used_heap_size(size_t size) { used_heap_size_ = size; }
2528 void set_heap_size_limit(size_t size) { heap_size_limit_ = size; }
2527 2529
2528 size_t total_heap_size_; 2530 size_t total_heap_size_;
2529 size_t total_heap_size_executable_; 2531 size_t total_heap_size_executable_;
2530 size_t used_heap_size_; 2532 size_t used_heap_size_;
2533 size_t heap_size_limit_;
2531 2534
2532 friend class V8; 2535 friend class V8;
2533 }; 2536 };
2534 2537
2535 2538
2536 /** 2539 /**
2537 * Isolate represents an isolated instance of the V8 engine. V8 2540 * Isolate represents an isolated instance of the V8 engine. V8
2538 * isolates have completely separate states. Objects from one isolate 2541 * isolates have completely separate states. Objects from one isolate
2539 * must not be used in other isolates. When V8 is initialized a 2542 * must not be used in other isolates. When V8 is initialized a
2540 * default isolate is implicitly created and entered. The embedder 2543 * default isolate is implicitly created and entered. The embedder
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
3155 * object that was associated with this context before a call to 3158 * object that was associated with this context before a call to
3156 * DetachGlobal. 3159 * DetachGlobal.
3157 */ 3160 */
3158 void ReattachGlobal(Handle<Object> global_object); 3161 void ReattachGlobal(Handle<Object> global_object);
3159 3162
3160 /** Creates a new context. 3163 /** Creates a new context.
3161 * 3164 *
3162 * Returns a persistent handle to the newly allocated context. This 3165 * Returns a persistent handle to the newly allocated context. This
3163 * persistent handle has to be disposed when the context is no 3166 * persistent handle has to be disposed when the context is no
3164 * longer used so the context can be garbage collected. 3167 * longer used so the context can be garbage collected.
3168 *
3169 * \param extensions An optional extension configuration containing
3170 * the extensions to be installed in the newly created context.
3171 *
3172 * \param global_template An optional object template from which the
3173 * global object for the newly created context will be created.
3174 *
3175 * \param global_object An optional global object to be reused for
3176 * the newly created context. This global object must have been
3177 * created by a previous call to Context::New with the same global
3178 * template. The state of the global object will be completely reset
3179 * and only object identify will remain.
3165 */ 3180 */
3166 static Persistent<Context> New( 3181 static Persistent<Context> New(
3167 ExtensionConfiguration* extensions = NULL, 3182 ExtensionConfiguration* extensions = NULL,
3168 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), 3183 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
3169 Handle<Value> global_object = Handle<Value>()); 3184 Handle<Value> global_object = Handle<Value>());
3170 3185
3171 /** Returns the last entered context. */ 3186 /** Returns the last entered context. */
3172 static Local<Context> GetEntered(); 3187 static Local<Context> GetEntered();
3173 3188
3174 /** Returns the context that is on the top of the stack. */ 3189 /** Returns the context that is on the top of the stack. */
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
3892 3907
3893 3908
3894 } // namespace v8 3909 } // namespace v8
3895 3910
3896 3911
3897 #undef V8EXPORT 3912 #undef V8EXPORT
3898 #undef TYPE_CHECK 3913 #undef TYPE_CHECK
3899 3914
3900 3915
3901 #endif // V8_H_ 3916 #endif // V8_H_
OLDNEW
« no previous file with comments | « SConstruct ('k') | src/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698