Home | History | Annotate | Download | only in include

Lines Matching refs:v8

1 // Copyright 2007-2009 the V8 project authors. All rights reserved.
28 /** \mainpage V8 API Reference Guide
30 * V8 is Google's open source JavaScript engine.
33 * V8 header file, include/v8.h.
35 * For other documentation see http://code.google.com/apis/v8/
45 // Setup for Windows DLL export/import. When building the V8 DLL the
47 // the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
48 // static library or building a program which uses the V8 static library neither
66 // between building or using the V8 shared library, but we should not
77 * The v8 JavaScript engine.
79 namespace v8 {
125 * V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWeak.
142 * An object reference managed by the v8 garbage collector.
144 * All objects returned from v8 have to be tracked by the garbage
257 * that return objects from within v8 return them in local handles. They
303 * the v8 engine which holds an object value and which is updated by
382 * callback to the given V8::WeakReferenceCallback function, passing
402 * interface description in v8-profiler.h for details.
773 * Returns StackTrace as a v8::Array that contains StackFrame objects.
1042 V8EXPORT static v8::Local<v8::String> Empty();
1062 * Internally V8 will call this Dispose method when the external string
1074 friend class v8::internal::Heap;
1079 * buffer that resides outside V8's heap. Implement an
1108 * string buffer that resides outside V8's heap. Implement an
1145 static inline String* Cast(v8::Value* obj);
1173 * resource. When the external string is no longer live on V8's heap the
1194 * resource. When the external string is no longer live on V8's heap the
1236 explicit Utf8Value(Handle<v8::Value> obj);
1259 explicit AsciiValue(Handle<v8::Value> obj);
1281 explicit Value(Handle<v8::Value> obj);
1297 V8EXPORT static void CheckCast(v8::Value* obj);
1308 static inline Number* Cast(v8::Value* obj);
1311 static void CheckCast(v8::Value* obj);
1323 static inline Integer* Cast(v8::Value* obj);
1326 V8EXPORT static void CheckCast(v8::Value* obj);
1365 static inline Date* Cast(v8::Value* obj);
1370 * parameters. V8 keeps a cache of various values used for
1382 V8EXPORT static void CheckCast(v8::Value* obj);
1408 * RegExp::New(v8::String::New("foo"),
1426 static inline RegExp* Cast(v8::Value* obj);
1429 V8EXPORT static void CheckCast(v8::Value* obj);
1632 * hidden from the executing JavaScript and only accessible through the V8
1633 * C++ API. Hidden properties introduced by V8 internally (for example the
1634 * identity hash) are prefixed with "v8::".
1665 * the backing store is preserved while V8 has a reference.
1677 * the backing store is preserved while V8 has a reference.
1762 * The Wrap function V8 will return the most optimal Value object wrapping the
1778 V8EXPORT static void CheckCast(v8::Value* obj);
1779 static inline void* QuickUnwrap(Handle<v8::Value> obj);
1780 V8EXPORT static void* FullUnwrap(Handle<v8::Value> obj);
1872 * The result is an integer encoding property attributes (like v8::None,
1873 * v8::DontEnum, etc.)
1987 * v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New();
1988 * t->Set("func_property", v8::Number::New(1));
1990 * v8::Local<v8::Template> proto_t = t->PrototypeTemplate();
1991 * proto_t->Set("proto_method", v8::FunctionTemplate::New(InvokeCallback));
1992 * proto_t->Set("proto_const", v8::Number::New(2));
1994 * v8::Local<v8::ObjectTemplate> instance_t = t->InstanceTemplate();
1999 * v8::Local<v8::Function> function = t->GetFunction();
2000 * v8::Local<v8::Object> instance = function->NewInstance();
2331 virtual v8::Handle<v8::FunctionTemplate>
2332 GetNativeFunction(v8::Handle<v8::String> name) {
2333 return v8::Handle<v8::FunctionTemplate>();
2384 * If you are using threads then you should hold the V8::Locker lock while
2511 * In V8, profiler consists of several modules: CPU profiler, and different
2526 * Collection of V8 heap information.
2528 * Instances of this class can be passed to v8::V8::HeapStatistics to
2529 * get heap statistics from V8.
2552 friend class V8;
2559 * Isolate represents an isolated instance of the V8 engine. V8
2561 * must not be used in other isolates. When V8 is initialized a
2645 class V8EXPORT V8 {
2653 * V8 running out of memory is treated as a fatal error by default.
2654 * This means that the fatal error handler is called and that V8 is
2665 * Check if V8 is dead and therefore unusable. This is the case after
2685 * Tells V8 to capture current stack trace when uncaught exception occurs
2694 * Sets V8 flags from a string.
2699 * Sets V8 flags from the command line.
2792 * and perform custom logging when V8 Allocates Executable Memory.
2811 * See v8-profiler.h for RetainedObjectInfo interface description.
2837 * V8 an indication of the amount of externally allocated memory
2838 * that is kept alive by JavaScript objects. V8 uses this to decide
2853 * When the V8 profiling mode is enabled (usually via command line
2858 * enable V8 profiling.
2933 * Retrieve the V8 thread id of the calling thread.
2935 * The thread id for a thread should only be retrieved after the V8
2944 * TerminateExecution should only be called when then V8 lock has
2972 * acquired the V8 lock with a Locker object.
2979 * Is V8 terminating JavaScript execution.
2989 * Releases any resources used by v8 and stops any utility threads
2990 * that may be running. Note that disposing v8 is permanent, it
2993 * It should generally not be necessary to dispose v8 before exiting
2995 * to use if the process needs the resources taken up by v8.
3006 * V8 uses the notification to reduce memory footprint.
3009 * until real work has been done. This indicates that V8 has done
3016 * V8 uses these notifications to attempt to free memory.
3021 * Optional notification that a context has been disposed. V8 uses
3024 * V8 had a chance to clean up.
3029 V8();
3056 * Creates a new try/catch block and registers it with v8.
3115 Local<v8::Message> Message() const;
3154 friend class v8::internal::Isolate;
3191 * would break VM---v8 expects only global object as a prototype of
3282 /** Returns true if V8 has a current context. */
3316 * Multiple threads in V8 are allowed, but only one thread at a time
3317 * is allowed to use any given V8 isolate. See Isolate class
3318 * comments. The definition of 'using V8 isolate' includes
3320 * from V8 handles while in the particular V8 isolate. It is up
3321 * to the user of V8 to ensure (perhaps with locking) that this
3324 * More then one thread and multiple V8 isolates can be used
3330 * If you wish to start using V8 isolate in more then one thread
3331 * you can do this by constructing a v8::Locker object to guard
3332 * access to the isolate. After the code using V8 has completed
3341 * v8::Locker locker;
3343 * // Code using V8 goes here.
3348 * If you wish to stop using V8 in a thread A you can do this by either
3349 * by destroying the v8::Locker object as above or by constructing a
3350 * v8::Unlocker object:
3354 * v8::Unlocker unlocker;
3356 * // Code not using V8 goes here while V8 can run in another thread.
3362 * from V8, where you want to release the V8 lock for other threads to
3365 * The v8::Locker is a recursive lock. That is, you can lock more than
3376 * // V8 not locked.
3378 * v8::Locker locker;
3379 * // V8 locked.
3381 * v8::Locker another_locker;
3382 * // V8 still locked (2 levels).
3384 * v8::Unlocker unlocker;
3385 * // V8 not locked.
3387 * // V8 locked again (2 levels).
3389 * // V8 still locked (1 level).
3391 * // V8 Now no longer locked.
3411 * for the V8 lock.
3426 * Returns whether v8::Locker is being used by this V8 instance.
3443 * An interface for exporting data from V8, using "push" model.
3568 * This class exports constants and functionality from within v8 that
3569 * is necessary to implement inline functions in the v8 api. Don't
3576 // the implementation of v8.
3673 return Persistent<T>(reinterpret_cast<T*>(V8::GlobalizeReference(p)));
3680 return V8::IsGlobalNearDeath(reinterpret_cast<internal::Object**>(**this));
3687 return V8::IsGlobalWeak(reinterpret_cast<internal::Object**>(**this));
3694 V8::DisposeGlobal(reinterpret_cast<internal::Object**>(**this));
3703 V8::MakeWeak(reinterpret_cast<internal::Object**>(**this),
3710 V8::ClearWeak(reinterpret_cast<internal::Object**>(**this));
3715 V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id);
3792 void Template::Set(const char* name, v8::Handle<Data> value) {
3793 Set(v8::String::New(name), value);
3824 void* External::Unwrap(Handle<v8::Value> obj) {
3833 void* External::QuickUnwrap(Handle<v8::Value> wrapper) {
3835 O* obj = *reinterpret_cast<O**>(const_cast<v8::Value*>(*wrapper));
3859 String* String::Cast(v8::Value* value) {
3902 Number* Number::Cast(v8::Value* value) {
3910 Integer* Integer::Cast(v8::Value* value) {
3918 Date* Date::Cast(v8::Value* value) {
3926 RegExp* RegExp::Cast(v8::Value* value) {
3934 Object* Object::Cast(v8::Value* value) {
3942 Array* Array::Cast(v8::Value* value) {
3950 Function* Function::Cast(v8::Value* value) {
3958 External* External::Cast(v8::Value* value) {
3993 } // namespace v8