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
2017-10-04 06:00:09 -07:00
committed by Facebook Github Bot
parent ef2e29f54c
commit d07279c978
2 changed files with 14 additions and 10 deletions
-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);
};
}