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

Side by Side Diff: include/v8.h

Issue 346233002: Add a use counter API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 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 | « no previous file | src/api.cc » ('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 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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 4111 matching lines...) Expand 10 before | Expand all | Expand 10 after
4122 /** 4122 /**
4123 * Types of garbage collections that can be requested via 4123 * Types of garbage collections that can be requested via
4124 * RequestGarbageCollectionForTesting. 4124 * RequestGarbageCollectionForTesting.
4125 */ 4125 */
4126 enum GarbageCollectionType { 4126 enum GarbageCollectionType {
4127 kFullGarbageCollection, 4127 kFullGarbageCollection,
4128 kMinorGarbageCollection 4128 kMinorGarbageCollection
4129 }; 4129 };
4130 4130
4131 /** 4131 /**
4132 * Features reported via the SetUseCounterCallback callback. Do not chang
4133 * assigned numbers of existing items; add new features to the end of this
4134 * list.
4135 */
4136 enum UseCounterFeature {
4137 kUseAsm = 0
4138 };
4139
4140 typedef void (*UseCounterCallback)(Isolate* isolate,
4141 UseCounterFeature feature);
4142
4143
4144 /**
4132 * Creates a new isolate. Does not change the currently entered 4145 * Creates a new isolate. Does not change the currently entered
4133 * isolate. 4146 * isolate.
4134 * 4147 *
4135 * When an isolate is no longer used its resources should be freed 4148 * When an isolate is no longer used its resources should be freed
4136 * by calling Dispose(). Using the delete operator is not allowed. 4149 * by calling Dispose(). Using the delete operator is not allowed.
4137 */ 4150 */
4138 static Isolate* New(); 4151 static Isolate* New();
4139 4152
4140 /** 4153 /**
4141 * Returns the entered isolate for the current thread or NULL in 4154 * Returns the entered isolate for the current thread or NULL in
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
4390 * run when the script call depth decrements to zero. 4403 * run when the script call depth decrements to zero.
4391 */ 4404 */
4392 void SetAutorunMicrotasks(bool autorun); 4405 void SetAutorunMicrotasks(bool autorun);
4393 4406
4394 /** 4407 /**
4395 * Experimental: Returns whether the Microtask Work Queue is automatically 4408 * Experimental: Returns whether the Microtask Work Queue is automatically
4396 * run when the script call depth decrements to zero. 4409 * run when the script call depth decrements to zero.
4397 */ 4410 */
4398 bool WillAutorunMicrotasks() const; 4411 bool WillAutorunMicrotasks() const;
4399 4412
4413 /**
4414 * Sets a callback for counting the number of times a feature of V8 is used.
4415 */
4416 void SetUseCounterCallback(UseCounterCallback callback);
4417
4400 private: 4418 private:
4401 template<class K, class V, class Traits> friend class PersistentValueMap; 4419 template<class K, class V, class Traits> friend class PersistentValueMap;
4402 4420
4403 Isolate(); 4421 Isolate();
4404 Isolate(const Isolate&); 4422 Isolate(const Isolate&);
4405 ~Isolate(); 4423 ~Isolate();
4406 Isolate& operator=(const Isolate&); 4424 Isolate& operator=(const Isolate&);
4407 void* operator new(size_t size); 4425 void* operator new(size_t size);
4408 void operator delete(void*, size_t); 4426 void operator delete(void*, size_t);
4409 4427
(...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after
6665 */ 6683 */
6666 6684
6667 6685
6668 } // namespace v8 6686 } // namespace v8
6669 6687
6670 6688
6671 #undef TYPE_CHECK 6689 #undef TYPE_CHECK
6672 6690
6673 6691
6674 #endif // V8_H_ 6692 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698