Lines Matching full:local
59 // Called when ToLocalChecked is called on an empty Local.
64 * A stack-allocated class that governs a number of local handles.
65 * After a handle scope has been created, all local handles will be
72 * After the handle scope of a local handle has been deleted the
115 // Local::New uses CreateHandle with an Isolate* parameter.
117 friend class Local; variable
136 * There are two types of handles: local and persistent handles.
138 * Local handles are light-weight and transient and typically used in local
141 * inside of the HandleScope active during their creation. For passing a local
150 * handle (for instance, to extract the Object* from a Local<Object>); the value
155 class Local {
157 V8_INLINE Local() : val_(nullptr) {} in Local() function
159 V8_INLINE Local(Local<S> that) : val_(reinterpret_cast<T*>(*that)) { in Local() function
162 * handles. For example, converting from a Local<String> to a in Local()
163 * Local<Number>. in Local()
193 V8_INLINE bool operator==(const Local<S>& that) const {
221 V8_INLINE bool operator!=(const Local<S>& that) const {
231 * Cast a handle to a subclass, e.g. Local<Value> to Local<Object>.
236 V8_INLINE static Local<T> Cast(Local<S> that) { in Cast()
240 if (that.IsEmpty()) return Local<T>(); in Cast()
242 return Local<T>(T::Cast(*that)); in Cast()
246 * Calling this is equivalent to Local<S>::Cast().
251 V8_INLINE Local<S> As() const { in As()
252 return Local<S>::Cast(*this); in As()
256 * Create a local handle for the content of another handle.
257 * The referee is kept alive by the local handle even when
260 V8_INLINE static Local<T> New(Isolate* isolate, Local<T> that) { in New()
264 V8_INLINE static Local<T> New(Isolate* isolate, in New()
269 V8_INLINE static Local<T> New(Isolate* isolate, in New()
284 friend class Local; variable
298 friend Local<Primitive> Undefined(Isolate* isolate);
299 friend Local<Primitive> Null(Isolate* isolate);
300 friend Local<Boolean> True(Isolate* isolate);
301 friend Local<Boolean> False(Isolate* isolate);
317 explicit V8_INLINE Local(T* that) : val_(that) {} in Local() function
318 V8_INLINE static Local<T> New(Isolate* isolate, T* that) { in New()
319 if (that == nullptr) return Local<T>(); in New()
322 return Local<T>(reinterpret_cast<T*>(HandleScope::CreateHandle( in New()
329 // Handle is an alias for Local for historical reasons.
331 using Handle = Local<T>;
335 * A MaybeLocal<> is a wrapper around Local<> that enforces a check whether
336 * the Local<> is empty before it can be used.
349 V8_INLINE MaybeLocal(Local<S> that) : val_(reinterpret_cast<T*>(*that)) { in MaybeLocal()
356 * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty,
360 V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { in ToLocal()
366 * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty,
369 V8_INLINE Local<T> ToLocalChecked() { in ToLocalChecked()
371 return Local<T>(val_); in ToLocalChecked()
375 * Converts this MaybeLocal<> to a Local<>, using a default value if this
379 V8_INLINE Local<S> FromMaybe(Local<S> default_value) const { in FromMaybe()
380 return IsEmpty() ? default_value : Local<S>(val_); in FromMaybe()
401 V8_INLINE Local<T> Escape(Local<T> value) { in Escape()
404 return Local<T>(reinterpret_cast<T*>(slot)); in Escape()
409 return Escape(value.FromMaybe(Local<T>())); in EscapeMaybe()