Remove usage of "this" in a callback in RCTNativeModule

Summary: As RCTNativeModule can be destructed at any time, it's unsafe to capture "this" in a callback.

Reviewed By: javache

Differential Revision: D5963728

fbshipit-source-id: c80a01c851d97813e4fead2b31c442eaeb8ae204
This commit is contained in:
Alex Dvornikov authored and Facebook Github Bot committed 2017-10-04 06:00:09 -07:00
1 parent ef2e29f54c
commit d07279c978
2 files changed
+14 -10

No files matched your search

-1
View File
@@ -26,7 +26,6 @@ class RCTNativeModule : public NativeModule {
private:
__weak RCTBridge *m_bridge;
RCTModuleData *m_moduleData;
MethodCallResult invokeInner(unsigned int methodId, const folly::dynamic &params);
};
}