Home | History | Annotate | Download | only in src

Lines Matching refs:Handle

38 // A Handle provides a reference to an object that survives relocation by
41 // When a handle is created for an object a cell is allocated in the heap.
44 class Handle {
46 INLINE(explicit Handle(T** location)) { location_ = location; }
47 INLINE(explicit Handle(T* obj));
48 INLINE(Handle(T* obj, Isolate* isolate));
50 INLINE(Handle()) : location_(NULL) {}
53 // Ex. Handle<JSFunction> can be passed when Handle<Object> is expected.
54 template <class S> Handle(Handle<S> handle) {
61 location_ = reinterpret_cast<T**>(handle.location());
66 // Check if this handle refers to the exact same object as the other handle.
67 bool is_identical_to(const Handle<T> other) const {
81 template <class S> static Handle<T> cast(Handle<S> that) {
83 return Handle<T>(reinterpret_cast<T**>(that.location()));
86 static Handle<T> null() { return Handle<T>(); }
89 // Closes the given scope, but lets this handle escape. See
91 inline Handle<T> EscapeFrom(v8::HandleScope* scope);
99 // After a handle scope has been created, all local handles will be
100 // allocated within that handle scope until either the handle scope is
101 // deleted or another handle scope is created. If there is already a
102 // handle scope and a new one is created, all allocations will take
103 // place in the new handle scope until it is deleted. After that,
104 // new handles will again be allocated in the original handle scope.
106 // After the handle scope of a local handle has been deleted the
108 // handle and may deallocate it. The behavior of accessing a handle
109 // for which the handle scope has been deleted is undefined.
120 // Creates a new handle with the given value.
133 // a Handle backed by the parent scope holding the
134 // value of the argument handle.
136 Handle<T> CloseAndEscape(Handle<T> handle_value);
141 // Prevent heap allocation or illegal handle scopes.
153 // Extend the handle scope making room for more handles.
165 // Handle operations.
166 // They might invoke garbage collection. The result is an handle to
167 // an object of expected type, or the handle is an error if running out
171 void FlattenString(Handle<String> str);
175 Handle<String> FlattenGetString(Handle<String> str);
177 int Utf8Length(Handle<String> str);
179 Handle<Object> SetProperty(Handle<Object> object,
180 Handle<Object> key,
181 Handle<Object> value,
185 Handle<Object> ForceSetProperty(Handle<JSObject> object,
186 Handle<Object> key,
187 Handle<Object> value,
190 Handle<Object> ForceDeleteProperty(Handle<JSObject> object,
191 Handle<Object> key);
193 Handle<Object> GetProperty(Handle<JSReceiver> obj,
196 Handle<Object> GetProperty(Handle<Object> obj,
197 Handle<Object> key);
199 Handle<Object> GetPropertyWithInterceptor(Handle<JSObject> receiver,
200 Handle<JSObject> holder,
201 Handle<String> name,
204 Handle<Object> SetPrototype(Handle<JSObject> obj, Handle<Object> value);
206 Handle<Object> LookupSingleCharacterStringFromCode(uint32_t index);
208 Handle<JSObject> Copy(Handle<JSObject> obj);
210 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info);
212 Handle<FixedArray> AddKeysFromJSArray(Handle<FixedArray>,
213 Handle<JSArray> array);
217 Handle<JSValue> GetScriptWrapper(Handle<Script> script);
220 void InitScriptLineEnds(Handle<Script> script);
224 Handle<FixedArray> CalculateLineEnds(Handle<String> string,
226 int GetScriptLineNumber(Handle<Script> script, int code_position);
228 int GetScriptLineNumberSafe(Handle<Script> script, int code_position);
229 int GetScriptColumnNumber(Handle<Script> script, int code_position);
233 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSReceiver> receiver,
234 Handle<JSObject> object);
235 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSReceiver> receiver,
236 Handle<JSObject> object);
242 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSReceiver> object,
245 Handle<JSArray> GetKeysFor(Handle<JSReceiver> object, bool* threw);
246 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object,
251 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first,
252 Handle<FixedArray> second);
254 Handle<String> SubString(Handle<String> str,
260 void SetExpectedNofProperties(Handle<JSFunction> func, int nof);
263 void SetPrototypeProperty(Handle<JSFunction> func, Handle<JSObject> value);
266 void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared,
270 Handle<JSGlobalProxy> ReinitializeJSGlobalProxy(
271 Handle<JSFunction> constructor,
272 Handle<JSGlobalProxy> global);
274 Handle<Object> SetPrototype(Handle<JSFunction> function,
275 Handle<Object> prototype);
277 Handle<ObjectHashSet> ObjectHashSetAdd(Handle<ObjectHashSet> table,
278 Handle<Object> key);
280 Handle<ObjectHashSet> ObjectHashSetRemove(Handle<ObjectHashSet> table,
281 Handle<Object> key);
283 Handle<ObjectHashTable> PutIntoObjectHashTable(Handle<ObjectHashTable> table,
284 Handle<Object> key,
285 Handle<Object> value);