Home | History | Annotate | Download | only in include

Lines Matching refs:Handle

101 template <class T> class Handle;
163 * It is safe to extract the object stored in the handle by
164 * dereferencing the handle (for instance, to extract the Object* from
165 * a Handle<Object>); the value will still be governed by a handle
169 template <class T> class Handle {
172 * Creates an empty handle.
174 inline Handle() : val_(0) {}
177 * Creates a new handle for the specified value.
179 inline explicit Handle(T* val) : val_(val) {}
182 * Creates a handle for the contents of the specified handle. This
185 * incompatible handles, for instance from a Handle<String> to a
186 * Handle<Number> it will cause a compile-time error. Assigning
188 * Handle<String> to a variable declared as Handle<Value>, is legal
191 template <class S> inline Handle(Handle<S> that)
195 * handles. For example, converting from a Handle<String> to a
196 * Handle<Number>.
202 * Returns true if the handle is empty.
207 * Sets the handle to be empty. IsEmpty() will then return true.
221 template <class S> inline bool operator==(Handle<S> that) const {
235 template <class S> inline bool operator!=(Handle<S> that) const {
239 template <class S> static inline Handle<T> Cast(Handle<S> that) {
242 // that the handle isn't empty before doing the checked cast.
243 if (that.IsEmpty()) return Handle<T>();
245 return Handle<T>(T::Cast(*that));
248 template <class S> inline Handle<S> As() {
249 return Handle<S>::Cast(*this);
258 * A light-weight stack-allocated object handle. All operations
261 * handle scope are destroyed when the handle scope is destroyed. Hence it
264 template <class T> class Local : public Handle<T> {
268 : Handle<T>(reinterpret_cast<T*>(*that)) {
271 * handles. For example, converting from a Handle<String> to a
272 * Handle<Number>.
276 template <class S> inline Local(S* that) : Handle<T>(that) { }
280 // that the handle isn't empty before doing the checked cast.
290 /** Create a local handle for the content of another handle.
291 * The referee is kept alive by the local handle even when
292 * the original handle is destroyed/disposed.
294 inline static Local<T> New(Handle<T> that);
299 * An object reference that is independent of any handle scope. Where
300 * a Local handle only lives as long as the HandleScope in which it was
301 * allocated, a Persistent handle remains valid until it is explicitly
304 * A persistent handle contains a reference to a storage cell within
309 * are passed by value you may have many persistent handle objects
311 * persistent handle as an argument to a function you will not get two
315 template <class T> class Persistent : public Handle<T> {
318 * Creates an empty persistent handle that doesn't point to any
324 * Creates a persistent handle for the same storage cell as the
325 * specified handle. This constructor allows you to pass persistent
335 : Handle<T>(reinterpret_cast<T*>(*that)) {
338 * handles. For example, converting from a Handle<String> to a
339 * Handle<Number>.
344 template <class S> inline Persistent(S* that) : Handle<T>(that) { }
347 * "Casts" a plain handle which is known to be a persistent handle
348 * to a persistent handle.
350 template <class S> explicit inline Persistent(Handle<S> that)
351 : Handle<T>(*that) { }
356 // that the handle isn't empty before doing the checked cast.
367 * Creates a new persistent handle for an existing local or
368 * persistent handle.
370 inline static Persistent<T> New(Handle<T> that);
373 * Releases the storage cell referenced by this persistent handle.
375 * This handle's reference, and any other references to the storage
394 * Weak callback for an independent handle should not
401 *Checks if the handle holds the only reference to an object.
406 * Returns true if the handle's reference is weak.
411 * Assigns a wrapper class ID to the handle. See RetainedObjectInfo
424 * After a handle scope has been created, all local handles will be
425 * allocated within that handle scope until either the handle scope is
426 * deleted or another handle scope is created. If there is already a
427 * handle scope and a new one is created, all allocations will take
428 * place in the new handle scope until it is deleted. After that,
429 * new handles will again be allocated in the original handle scope.
431 * After the handle scope of a local handle has been deleted the
433 * handle and may deallocate it. The behavior of accessing a handle
434 * for which the handle scope has been deleted is undefined.
443 * Closes the handle scope and returns the value as a handle in the
446 template <class T> Local<T> Close(Handle<T> value);
454 * Creates a new handle with the given value.
461 // Make it impossible to create heap-allocated or illegal handle
487 handle
534 static ScriptData* PreCompile(Handle<String> source);
569 Handle<Value> resource_name,
570 Handle<Integer> resource_line_offset = Handle<Integer>(),
571 Handle<Integer> resource_column_offset = Handle<Integer>())
575 inline Handle<Value> ResourceName() const;
576 inline Handle<Integer> ResourceLineOffset() const;
577 inline Handle<Integer> ResourceColumnOffset() const;
579 Handle<Value> resource_name_;
580 Handle<Integer> resource_line_offset_;
581 Handle<Integer> resource_column_offset_;
605 static Local<Script> New(Handle<String> source,
608 Handle<String> script_data = Handle<String>());
620 static Local<Script> New(Handle<String> source,
621 Handle<Value> file_name);
639 static Local<Script> Compile(Handle<String> source,
642 Handle<String> script_data = Handle<String>());
657 static Local<Script> Compile(Handle<String> source,
658 Handle<Value> file_name,
659 Handle<String> script_data = Handle<String>());
680 void SetData(Handle<String> data);
696 Handle<Value> GetScriptResourceName() const;
702 Handle<Value> GetScriptData() const;
709 Handle<StackTrace> GetStackTrace() const;
970 * Returns an empty handle if the conversion fails.
981 V8EXPORT bool Equals(Handle<Value> that) const;
982 V8EXPORT bool StrictEquals(Handle<Value> that) const;
1003 static inline Handle<Boolean> New(bool value);
1208 V8EXPORT static Local<String> Concat(Handle<String> left,
1209 Handle<String> right);
1276 explicit Utf8Value(Handle<v8::Value> obj);
1299 explicit AsciiValue(Handle<v8::Value> obj);
1321 explicit Value(Handle<v8::Value> obj);
1416 typedef Handle<Value> (*AccessorGetter)(Local<String> property,
1451 V8EXPORT bool Set(Handle<Value> key,
1452 Handle<Value> value,
1456 Handle<Value> value);
1466 V8EXPORT bool ForceSet(Handle<Value> key,
1467 Handle<Value> value,
1470 V8EXPORT Local<Value> Get(Handle<Value> key);
1479 V8EXPORT PropertyAttribute GetPropertyAttributes(Handle<Value> key);
1482 // functions with generic ones that accept a Handle<Value> key.
1483 V8EXPORT bool Has(Handle<String> key);
1485 V8EXPORT bool Delete(Handle<String> key);
1489 V8EXPORT bool ForceDelete(Handle<Value> key);
1495 V8EXPORT bool SetAccessor(Handle<String> name,
1498 Handle<Value> data = Handle<Value>(),
1529 V8EXPORT bool SetPrototype(Handle<Value> prototype);
1536 Handle<FunctionTemplate> tmpl);
1555 V8EXPORT void SetInternalField(int index, Handle<Value> value);
1564 V8EXPORT bool HasOwnProperty(Handle<String> key);
1565 V8EXPORT bool HasRealNamedProperty(Handle<String> key);
1567 V8EXPORT bool HasRealNamedCallbackProperty(Handle<String> key);
1574 Handle<String> key);
1581 V8EXPORT Local<Value> GetRealNamedProperty(Handle<String> key);
1611 V8EXPORT bool SetHiddenValue(Handle<String> key, Handle<Value> value);
1612 V8EXPORT Local<Value> GetHiddenValue(Handle<String> key);
1613 V8EXPORT bool DeleteHiddenValue(Handle<String> key);
1674 V8EXPORT Local<Value> CallAsFunction(Handle<Object> recv,
1676 Handle<Value> argv[]);
1684 Handle<Value> argv[]);
1697 * returns the value. Otherwise an empty handle is returned.
1712 * handle if cloning fails (for any reason).
1735 V8EXPORT Local<Object> NewInstance(int argc, Handle<Value> argv[]) const;
1736 V8EXPORT Local<Value> Call(Handle<Object> recv,
1738 Handle<Value> argv[]);
1739 V8EXPORT void SetName(Handle<String> name);
1740 V8EXPORT Handle<Value> GetName() const;
1748 V8EXPORT Handle<Value> GetInferredName() const;
1760 V8EXPORT Handle<Value> GetScriptId() const;
1848 V8EXPORT static Local<Value> New(Handle<String> value);
1888 V8EXPORT static Local<RegExp> New(Handle<String> pattern,
1923 static inline void* Unwrap(Handle<Value> obj);
1931 static inline void* QuickUnwrap(Handle<v8::Value> obj);
1932 V8EXPORT static void* FullUnwrap(Handle<v8::Value> obj);
1945 void Set(Handle<String> name, Handle<Data> value,
1947 inline void Set(const char* name, Handle<Data> value);
2004 typedef Handle<Value> (*InvocationCallback)(const Arguments& args);
2010 typedef Handle<Value> (*NamedPropertyGetter)(Local<String> property,
2016 * Otherwise, returns an empty handle.
2018 typedef Handle<Value> (*NamedPropertySetter)(Local<String> property,
2023 * Returns a non-empty handle if the interceptor intercepts the request.
2027 typedef Handle<Integer> (*NamedPropertyQuery)(Local<String> property,
2032 * Returns a non-empty handle if the deleter intercepts the request.
2036 typedef Handle<Boolean> (*NamedPropertyDeleter)(Local<String> property,
2043 typedef Handle<Array> (*NamedPropertyEnumerator)(const AccessorInfo& info);
2048 * request. Otherwise, returns an empty handle.
2050 typedef Handle<Value> (*IndexedPropertyGetter)(uint32_t index,
2056 * Otherwise, returns an empty handle.
2058 typedef Handle<Value> (*IndexedPropertySetter)(uint32_t index,
2064 * Returns a non-empty handle if the interceptor intercepts the request.
2067 typedef Handle<Integer> (*IndexedPropertyQuery)(uint32_t index,
2071 * Returns a non-empty handle if the deleter intercepts the request.
2075 typedef Handle<Boolean> (*IndexedPropertyDeleter)(uint32_t index,
2082 typedef Handle<Array> (*IndexedPropertyEnumerator)(const AccessorInfo& info);
2214 Handle<Value> data = Handle<Value>(),
2215 Handle<Signature> signature = Handle<Signature>());
2225 Handle<Value> data = Handle<Value>());
2231 void Inherit(Handle<FunctionTemplate> parent);
2245 void SetClassName(Handle<String> name);
2271 bool HasInstance(Handle<Value> object);
2275 void AddInstancePropertyAccessor(Handle<String> name,
2278 Handle<Value> data,
2286 Handle<Value> data);
2292 Handle<Value> data);
2294 Handle<Value> data);
2339 void SetAccessor(Handle<String> name,
2342 Handle<Value> data = Handle<Value>(),
2368 Handle<Value> data = Handle<Value>());
2391 Handle<Value> data = Handle<Value>());
2400 Handle<Value> data = Handle<Value>());
2425 Handle<Value> data = Handle<Value>(),
2442 static Local<ObjectTemplate> New(Handle<FunctionTemplate> constructor);
2453 static Local<Signature> New(Handle<FunctionTemplate> receiver =
2454 Handle<FunctionTemplate>(),
2456 Handle<FunctionTemplate> argv[] = 0);
2468 static Local<TypeSwitch> New(Handle<FunctionTemplate> type);
2469 static Local<TypeSwitch> New(int argc, Handle<FunctionTemplate> types[]);
2470 int match(Handle<Value> value);
2505 virtual v8::Handle<v8::FunctionTemplate>
2506 GetNativeFunction(v8::Handle<v8::String> name) {
2507 return v8::Handle<v8::FunctionTemplate>();
2550 Handle<Primitive> V8EXPORT Undefined();
2551 Handle<Primitive> V8EXPORT Null();
2552 Handle<Boolean> V8EXPORT True();
2553 Handle<Boolean> V8EXPORT False();
2594 typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> data);
2603 Handle<Value> V8EXPORT ThrowException(Handle<Value> exception);
2611 static Local<Value> RangeError(Handle<String> message);
2612 static Local<Value> ReferenceError(Handle<String> message);
2613 static Local<Value> SyntaxError(Handle<String> message);
2614 static Local<Value> TypeError(Handle<String> message);
2615 static Local<Value> Error(Handle<String> message);
2888 virtual void VisitExternalString(Handle<String> string) {}
2958 Handle<Value> data = Handle<Value>());
3292 static internal::Object** GlobalizeReference(internal::Object** handle);
3304 template <class T> friend class Handle;
3353 Handle<Value> ReThrow();
3357 * been caught an empty handle is returned.
3359 * The returned handle is valid until this TryCatch block has been destroyed.
3365 * property is present an empty handle is returned.
3371 * no message associated an empty handle is returned.
3373 * The returned handle is valid until this TryCatch block has been
3477 void ReattachGlobal(Handle<Object> global_object);
3481 * Returns a persistent handle to the newly allocated context. This
3482 * persistent handle has to be disposed when the context is no
3499 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
3500 Handle<Value> global_object = Handle<Value>());
3511 * JavaScript frames an empty handle is returned.
3519 void SetSecurityToken(Handle<Value> token);
3525 Handle<Value> GetSecurityToken();
3552 void SetData(Handle<String> data);
3582 explicit inline Scope(Handle<Context> context) : context_(context) {
3587 Handle<Context> context_;
3944 Local<T>::Local() : Handle<T>() { }
3948 Local<T> Local<T>::New(Handle<T> that) {
3961 Persistent<T> Persistent<T>::New(Handle<T> that) {
3990 Persistent<T>::Persistent() : Handle<T>() { }
4062 Local<T> HandleScope::Close(Handle<T> value) {
4068 Handle<Value> ScriptOrigin::ResourceName() const {
4073 Handle<Integer> ScriptOrigin::ResourceLineOffset() const {
4078 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const {
4083 Handle<Boolean> Boolean::New(bool value) {
4088 void Template::Set(const char* name, v8::Handle<Data> value) {
4120 void* External::Unwrap(Handle<v8::Value> obj) {
4129 void* External::QuickUnwrap(Handle<v8::Value> wrapper) {