mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove unused RAIICallbackWrapperDestroyer (#52390)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52390 Changelog: [Internal] Reviewed By: cortinico Differential Revision: D77710424 fbshipit-source-id: 7c1d7e3181450394311a001af117c6fbdcaeba31
This commit is contained in:
1 parent
ccb9edc717
commit
2ce7eab5f9
1 file changed
-19
-19
@@ -35,23 +35,4 @@ jsi::Value createPromiseAsJSIValue(
|
||||
jsi::Runtime& rt,
|
||||
PromiseSetupFunctionType&& func);
|
||||
|
||||
// Deprecated. Use AsyncCallback instead.
|
||||
class RAIICallbackWrapperDestroyer {
|
||||
public:
|
||||
RAIICallbackWrapperDestroyer(std::weak_ptr<CallbackWrapper> callbackWrapper)
|
||||
: callbackWrapper_(callbackWrapper) {}
|
||||
|
||||
~RAIICallbackWrapperDestroyer() {
|
||||
auto strongWrapper = callbackWrapper_.lock();
|
||||
if (!strongWrapper) {
|
||||
return;
|
||||
}
|
||||
|
||||
strongWrapper->destroy();
|
||||
}
|
||||
|
||||
private:
|
||||
std::weak_ptr<CallbackWrapper> callbackWrapper_;
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
Reference in new issue
Block a user