Lines Matching refs:Local

19 class Local;
74 // Called when ToLocalChecked is called on an empty Local.
155 friend class Local;
184 friend class Local;
225 * Local handles are light-weight and transient and typically used in local
237 * handle (for instance, to extract the Object* from a Local<Object>); the value
242 class Local : public LocalBase<T> {
244 V8_INLINE Local() = default;
247 V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
250 * handles. For example, converting from a Local<String> to a
251 * Local<Number>.
272 V8_INLINE bool operator==(const Local<S>& that) const {
282 V8_INLINE bool operator!=(const Local<S>& that) const {
292 * Cast a handle to a subclass, e.g. Local<Value> to Local<Object>.
297 V8_INLINE static Local<T> Cast(Local<S> that) {
301 if (that.IsEmpty()) return Local<T>();
304 return Local<T>(LocalBase<T>(that));
308 * Calling this is equivalent to Local<S>::Cast().
313 V8_INLINE Local<S> As() const {
314 return Local<S>::Cast(*this);
322 V8_INLINE static Local<T> New(Isolate* isolate, Local<T> that) {
326 V8_INLINE static Local<T> New(Isolate* isolate,
331 V8_INLINE static Local<T> New(Isolate* isolate,
344 friend class Local;
360 friend Local<Primitive> Undefined(Isolate* isolate);
361 friend Local<Primitive> Null(Isolate* isolate);
362 friend Local<Boolean> True(Isolate* isolate);
363 friend Local<Boolean> False(Isolate* isolate);
378 V8_INLINE explicit Local<T>(const LocalBase<T>& other)
381 V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
382 return Local<T>(LocalBase<T>::FromSlot(slot));
385 V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
386 return Local<T>(LocalBase<T>::New(isolate, value));
389 V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
390 return Local<T>(LocalBase<T>::New(isolate, that));
395 V8_INLINE Local<S> UnsafeAs() const {
396 return Local<S>(LocalBase<S>(*this));
401 // Handle is an alias for Local for historical reasons.
403 using Handle = Local<T>;
407 * A MaybeLocal<> is a wrapper around Local<> that enforces a check whether
408 * the Local<> is empty before it can be used.
421 V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
426 * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty,
430 V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
436 * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty,
439 V8_INLINE Local<T> ToLocalChecked() {
445 * Converts this MaybeLocal<> to a Local<>, using a default value if this
449 V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
450 return IsEmpty() ? default_value : Local<S>(local_);
454 Local<T> local_;
471 V8_INLINE Local<T> Escape(Local<T> value) {
475 return Local<T>::FromSlot(Escape(value.slot()));
481 return Escape(value.FromMaybe(Local<T>()));