Home | History | Annotate | Download | only in include

Lines Matching refs:v8

1 // Copyright 2011 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 {
128 * V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWeak.
145 * An object reference managed by the v8 garbage collector.
147 * All objects returned from v8 have to be tracked by the garbage
259 * that return objects from within v8 return them in local handles. They
305 * the v8 engine which holds an object value and which is updated by
383 * callback to the given V8::WeakReferenceCallback function, passing
412 * interface description in v8-profiler.h for details.
782 * Returns StackTrace as a v8::Array that contains StackFrame objects.
1081 V8EXPORT static v8::Local<v8::String> Empty();
1101 * Internally V8 will call this Dispose method when the external string
1113 friend class v8::internal::Heap;
1118 * buffer that resides outside V8's heap. Implement an
1147 * string buffer that resides outside V8's heap. Implement an
1185 static inline String* Cast(v8::Value* obj);
1213 * resource. When the external string is no longer live on V8's heap the
1234 * resource. When the external string is no longer live on V8's heap the
1276 explicit Utf8Value(Handle<v8::Value> obj);
1299 explicit AsciiValue(Handle<v8::Value> obj);
1321 explicit Value(Handle<v8::Value> obj);
1337 V8EXPORT static void CheckCast(v8::Value* obj);
1348 static inline Number* Cast(v8::Value* obj);
1351 V8EXPORT static void CheckCast(v8::Value* obj);
1363 static inline Integer* Cast(v8::Value* obj);
1366 V8EXPORT static void CheckCast(v8::Value* obj);
1607 * hidden from the executing JavaScript and only accessible through the V8
1608 * C++ API. Hidden properties introduced by V8 internally (for example the
1609 * identity hash) are prefixed with "v8::".
1640 * the backing store is preserved while V8 has a reference.
1652 * the backing store is preserved while V8 has a reference.
1784 static inline Date* Cast(v8::Value* obj);
1789 * parameters. V8 keeps a cache of various values used for
1801 V8EXPORT static void CheckCast(v8::Value* obj);
1817 static inline NumberObject* Cast(v8::Value* obj);
1820 V8EXPORT static void CheckCast(v8::Value* obj);
1836 static inline BooleanObject* Cast(v8::Value* obj);
1839 V8EXPORT static void CheckCast(v8::Value* obj);
1855 static inline StringObject* Cast(v8::Value* obj);
1858 V8EXPORT static void CheckCast(v8::Value* obj);
1884 * RegExp::New(v8::String::New("foo"),
1902 static inline RegExp* Cast(v8::Value* obj);
1905 V8EXPORT static void CheckCast(v8::Value* obj);
1914 * The Wrap function V8 will return the most optimal Value object wrapping the
1930 V8EXPORT static void CheckCast(v8::Value* obj);
1931 static inline void* QuickUnwrap(Handle<v8::Value> obj);
1932 V8EXPORT static void* FullUnwrap(Handle<v8::Value> obj);
2024 * The result is an integer encoding property attributes (like v8::None,
2025 * v8::DontEnum, etc.)
2139 * v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New();
2140 * t->Set("func_property", v8::Number::New(1));
2142 * v8::Local<v8::Template> proto_t = t->PrototypeTemplate();
2143 * proto_t->Set("proto_method", v8::FunctionTemplate::New(InvokeCallback));
2144 * proto_t->Set("proto_const", v8::Number::New(2));
2146 * v8::Local<v8::ObjectTemplate> instance_t = t->InstanceTemplate();
2151 * v8::Local<v8::Function> function = t->GetFunction();
2152 * v8::Local<v8::Object> instance = function->NewInstance();
2505 virtual v8::Handle<v8::FunctionTemplate>
2506 GetNativeFunction(v8::Handle<v8::String> name) {
2507 return v8::Handle<v8::FunctionTemplate>();
2561 * If you are using threads then you should hold the V8::Locker lock while
2697 * Collection of V8 heap information.
2699 * Instances of this class can be passed to v8::V8::HeapStatistics to
2700 * get heap statistics from V8.
2723 friend class V8;
2730 * Isolate represents an isolated instance of the V8 engine. V8
2732 * must not be used in other isolates. When V8 is initialized a
2837 * A helper class for driving V8 startup data decompression. It is based on
2838 * "CompressedStartupData" API functions from the V8 class. It isn't mandatory
2862 * EntropySource is used as a callback function when v8 needs a source
2869 * ReturnAddressLocationResolver is used as a callback function when v8 is
2895 class V8EXPORT V8 {
2910 * V8 running out of memory is treated as a fatal error by default.
2911 * This means that the fatal error handler is called and that V8 is
2922 * Check if V8 is dead and therefore unusable. This is the case after
2928 * The following 4 functions are to be used when V8 is built with
2930 * embedder must decompress startup data prior to initializing V8.
2932 * This is how interaction with V8 should look like:
2933 * int compressed_data_count = v8::V8::GetCompressedStartupDataCount();
2934 * v8::StartupData* compressed_data =
2935 * new v8::StartupData[compressed_data_count];
2936 * v8::V8::GetCompressedStartupData(compressed_data);
2938 * v8::V8::SetDecompressedStartupData(compressed_data);
2939 * ... now V8 can be initialized
2940 * ... make sure the decompressed data stays valid until V8 shutdown
2966 * Tells V8 to capture current stack trace when uncaught exception occurs
2975 * Sets V8 flags from a string.
2980 * Sets V8 flags from the command line.
3073 * and perform custom logging when V8 Allocates Executable Memory.
3105 * See v8-profiler.h for RetainedObjectInfo interface description.
3136 * Allows the host application to provide a callback that allows v8 to
3144 * V8 an indication of the amount of externally allocated memory
3145 * that is kept alive by JavaScript objects. V8 uses this to decide
3160 * When the V8 profiling mode is enabled (usually via command line
3165 * enable V8 profiling.
3181 * Retrieve the V8 thread id of the calling thread.
3183 * The thread id for a thread should only be retrieved after the V8
3192 * TerminateExecution should only be called when then V8 lock has
3220 * acquired the V8 lock with a Locker object.
3227 * Is V8 terminating JavaScript execution.
3239 * Releases any resources used by v8 and stops any utility threads
3240 * that may be running. Note that disposing v8 is permanent, it
3243 * It should generally not be necessary to dispose v8 before exiting
3245 * to use if the process needs the resources taken up by v8.
3263 * V8 uses the notification to reduce memory footprint.
3266 * until real work has been done. This indicates that V8 has done
3277 * V8 uses these notifications to attempt to free memory.
3282 * Optional notification that a context has been disposed. V8 uses
3285 * V8 had a chance to clean up.
3290 V8();
3317 * Creates a new try/catch block and registers it with v8.
3376 Local<v8::Message> Message() const;
3407 v8::internal::Isolate* isolate_;
3416 friend class v8::internal::Isolate;
3453 * would break VM---v8 expects only global object as a prototype of
3544 /** Returns true if V8 has a current context. */
3562 * V8::AllowCodeGenerationFromStrings callback will be invoked if
3599 * Multiple threads in V8 are allowed, but only one thread at a time
3600 * is allowed to use any given V8 isolate. See Isolate class
3601 * comments. The definition of 'using V8 isolate' includes
3603 * from V8 handles while in the particular V8 isolate. It is up
3604 * to the user of V8 to ensure (perhaps with locking) that this
3606 * mechanism that may be used, the v8::Locker and v8::Unlocker classes
3607 * must be used to signal thead switches to V8.
3609 * v8::Locker is a scoped lock object. While it's
3611 * allowed to use the locked isolate. V8 guarantees that an isolate can be
3613 * v8::Locker is a critical section.
3619 * v8::Locker locker(isolate);
3620 * v8::Isolate::Scope isolate_scope(isolate);
3622 * // Code using V8 and isolate goes here.
3627 * If you wish to stop using V8 in a thread A you can do this either
3628 * by destroying the v8::Locker object as above or by constructing a
3629 * v8::Unlocker object:
3634 * v8::Unlocker unlocker(isolate);
3636 * // Code not using V8 goes here while V8 can run in another thread.
3643 * from V8, where you want to release the V8 lock for other threads to
3646 * The v8::Locker is a recursive lock. That is, you can lock more than
3657 * // V8 not locked.
3659 * v8::Locker locker(isolate);
3661 * // V8 locked.
3663 * v8::Locker another_locker(isolate);
3664 * // V8 still locked (2 levels).
3667 * v8::Unlocker unlocker(isolate);
3668 * // V8 not locked.
3671 * // V8 locked again (2 levels).
3673 * // V8 still locked (1 level).
3675 * // V8 Now no longer locked.
3705 * for the V8 lock.
3721 * Returns whether v8::Locker is being used by this V8 instance.
3739 * An interface for exporting data from V8, using "push" model.
3864 * This class exports constants and functionality from within v8 that
3865 * is necessary to implement inline functions in the v8 api. Don't
3871 // the implementation of v8.
3964 return Persistent<T>(reinterpret_cast<T*>(V8::GlobalizeReference(p)));
3971 return V8::IsGlobalNearDeath(reinterpret_cast<internal::Object**>(**this));
3978 return V8::IsGlobalWeak(reinterpret_cast<internal::Object**>(**this));
3985 V8::DisposeGlobal(reinterpret_cast<internal::Object**>(**this));
3994 V8::MakeWeak(reinterpret_cast<internal::Object**>(**this),
4001 V8::ClearWeak(reinterpret_cast<internal::Object**>(**this));
4006 V8::MarkIndependent(reinterpret_cast<internal::Object**>(**this));
4011 V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id);
4088 void Template::Set(const char* name, v8::Handle<Data> value) {
4089 Set(v8::String::New(name), value);
4120 void* External::Unwrap(Handle<v8::Value> obj) {
4129 void* External::QuickUnwrap(Handle<v8::Value> wrapper) {
4131 O* obj = *reinterpret_cast<O**>(const_cast<v8::Value*>(*wrapper));
4155 String* String::Cast(v8::Value* value) {
4198 Number* Number::Cast(v8::Value* value) {
4206 Integer* Integer::Cast(v8::Value* value) {
4214 Date* Date::Cast(v8::Value* value) {
4222 StringObject* StringObject::Cast(v8::Value* value) {
4230 NumberObject* NumberObject::Cast(v8::Value* value) {
4238 BooleanObject* BooleanObject::Cast(v8::Value* value) {
4246 RegExp* RegExp::Cast(v8::Value* value) {
4254 Object* Object::Cast(v8::Value* value) {
4262 Array* Array::Cast(v8::Value* value) {
4270 Function* Function::Cast(v8::Value* value) {
4278 External* External::Cast(v8::Value* value) {
4313 } // namespace v8