Skip to content

Commit 79712c3

Browse files
chadaustinfacebook-github-bot
authored andcommitted
Disallow Optional::operator=(nullptr_t) unless T is a pointer
Summary: The old implementation of folly::none inadvertently allowed disengaging an optional by writing `op = nullptr`. Disallow that and require `op = folly::none`. Reviewed By: yfeldblum Differential Revision: D12884724 fbshipit-source-id: b17bcf00b245069d8ea2d9bc3703b0fdcaa85c07
1 parent 3a98318 commit 79712c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Value JSINativeModules::getModule(Runtime& rt, const PropNameID& name) {
4545
}
4646

4747
void JSINativeModules::reset() {
48-
m_genNativeModuleJS = nullptr;
48+
m_genNativeModuleJS = folly::none;
4949
m_objects.clear();
5050
}
5151

0 commit comments

Comments
 (0)