Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d244cff
Add changes plus a bunch of test code
ryantrem Jan 13, 2025
c21f4bb
A little more testing
ryantrem Jan 13, 2025
b8e9a4b
Cleanup
ryantrem Jan 14, 2025
173d9a9
Use symbol for property key
ryantrem Jan 14, 2025
612cbb9
Add reusable Apply/Lookup functions
ryantrem Jan 15, 2025
ce8ab72
Swithc over WrapperInfo
ryantrem Jan 15, 2025
34db18c
Swithc over FunctionInfo
ryantrem Jan 15, 2025
e738b2a
Swithc over ConstructorInfo
ryantrem Jan 16, 2025
aef73eb
Move init_symbol into impl and use JSString so it correctly gets rele…
ryantrem Jan 16, 2025
f63825d
Rename helper functions
ryantrem Jan 16, 2025
a339e58
Add some comments
ryantrem Jan 16, 2025
3c2a8b3
Review feedback
ryantrem Jan 17, 2025
e4b3518
Update build tooling versions
ryantrem Jan 17, 2025
3bb04eb
Switch MacOS 14 to large (not ARM64)
ryantrem Jan 17, 2025
f70b3f9
Update casing (not sure why the image can't be selected)
ryantrem Jan 17, 2025
2c12063
Try another option for image name
ryantrem Jan 17, 2025
b71120d
Revert image names
ryantrem Jan 17, 2025
a220bd3
Revert Android emulator avd name
ryantrem Jan 17, 2025
465ab9f
Bring back emulator installation step but try to list avds
ryantrem Jan 17, 2025
c812a74
Try using older Java
ryantrem Jan 17, 2025
a694d8f
Take https://github.com/nodejs/node-addon-api/pull/1607/files
ryantrem Jan 17, 2025
ac392a4
Don't use info in extra JSObjectMake for empty prototype in Construct…
ryantrem Jan 17, 2025
debfb94
Try macos 13 for Android
ryantrem Jan 18, 2025
d98cf7d
Disable Android emulator audio
ryantrem Jan 18, 2025
c9ee1f1
Add some diagnostic output for xcode 'destiniations'
ryantrem Jan 18, 2025
8c3b1f3
Fix typo
ryantrem Jan 18, 2025
9e0b971
Try booting iOS simulator before building
ryantrem Jan 18, 2025
38f6cce
Remove showdestinations
ryantrem Jan 18, 2025
ecab6eb
Merge branch 'main' into weak-ref-fix-main
ryantrem Jan 21, 2025
97d7bc8
Apply suggestions from code review
ryantrem Jan 21, 2025
8a2bcb5
Fix another brace change for consistency
ryantrem Jan 21, 2025
97f15ea
Fix JSContextRef vs JSGlobalContextRef issue
ryantrem Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Core/Node-API/Include/Shared/napi/napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4513,7 +4513,7 @@ template <typename T>
inline ObjectWrap<T>::~ObjectWrap() {
// If the JS object still exists at this point, remove the finalizer added
// through `napi_wrap()`.
if (!IsEmpty()) {
if (!IsEmpty() && !_finalized) {
Object object = Value();
// It is not valid to call `napi_remove_wrap()` with an empty `object`.
// This happens e.g. during garbage collection.
Expand Down Expand Up @@ -4955,6 +4955,7 @@ inline void ObjectWrap<T>::FinalizeCallback(napi_env env,
void* /*hint*/) {
HandleScope scope(env);
T* instance = static_cast<T*>(data);
instance->_finalized = true;
instance->Finalize(Napi::Env(env));
delete instance;
}
Expand Down
1 change: 1 addition & 0 deletions Core/Node-API/Include/Shared/napi/napi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2497,6 +2497,7 @@ class ObjectWrap : public InstanceWrap<T>, public Reference<Object> {
}

bool _construction_failed = true;
bool _finalized = false;
};

class HandleScope {
Expand Down
Loading