Skip to content

Commit

Permalink
Use weak object for shareables on V8 (software-mansion#3839)
Browse files Browse the repository at this point in the history
## Summary

This PR enables weak object implementation for shareables when using V8 runtime.

As @Kudo mentioned in software-mansion#3722 (comment), react-native-v8 exposes weak objects API via JSI (see [here](https://github.com/Kudo/react-native-v8/blob/96a1a2c8a35349967a3ad7219106a3475b85433a/src/v8runtime/V8Runtime.cpp#L982-L997)).

## Test plan

Run Example app with react-native-v8 and check if everything works.
  • Loading branch information
tomekzaw authored and fluiddot committed Jun 5, 2023
1 parent 1f8cfcb commit 42b5ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Common/cpp/SharedItems/Shareables.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "RuntimeManager.h"
#include "Scheduler.h"

#define HAS_JS_WEAK_OBJECTS JS_RUNTIME_HERMES
#define HAS_JS_WEAK_OBJECTS (JS_RUNTIME_HERMES || JS_RUNTIME_V8)

using namespace facebook;

Expand Down

0 comments on commit 42b5ef8

Please sign in to comment.