Lines Matching defs:reference
1810 auto reference = reinterpret_cast<NativeReference**>(result);
1822 if (reference != nullptr) {
1824 *reference = ref;
1855 auto reference = reinterpret_cast<NativeReference**>(result);
1867 if (reference != nullptr) {
1869 *reference = ref;
1900 auto reference = reinterpret_cast<NativeReference**>(result);
1912 if (reference != nullptr) {
1915 *reference = ref;
2121 // Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
2137 // Deletes a reference. The referenced value is released, and may
2144 auto reference = reinterpret_cast<NativeReference*>(ref);
2145 uint32_t refCount = reference->GetRefCount();
2146 if (refCount > 0 || reference->GetFinalRun()) {
2147 delete reference;
2148 reference = nullptr;
2150 reference->SetDeleteSelf();
2156 // Increments the reference count, optionally returning the resulting count.
2157 // After this call the reference will be a strong reference because its
2166 auto reference = reinterpret_cast<NativeReference*>(ref);
2167 uint32_t refCount = reference->Ref();
2176 // Decrements the reference count, optionally returning the resulting count.
2177 // If the result is 0 the reference is now weak and the object may be GC'd
2185 auto reference = reinterpret_cast<NativeReference*>(ref);
2186 uint32_t unrefCount = reference->Unref();
2195 // Attempts to get a referenced value. If the reference is weak,
2204 auto reference = reinterpret_cast<NativeReference*>(ref);
2207 *result = reference->Get(engine);
3678 NativeReference* reference = nullptr;
3681 reference = engine->CreateReference(js_object, 1, false, callback, native_object, finalize_hint);
3682 *result = reinterpret_cast<napi_ref>(reference);
3684 reference = engine->CreateReference(js_object, 0, true, callback, native_object, finalize_hint);