Fabric: Making Sealable debug-only thing

Summary:
@public
Now, Sealable is already error-preventing-only mechanism, no business logic relies on that.
So, it makes sense to make it debug-only to illuminate possible performance impact.

Reviewed By: mdvacca

Differential Revision: D8923597

fbshipit-source-id: 80aa9097c4b719e91de73ac59f38d3a4751f0b06
This commit is contained in:
Valentin Shergin authored and Facebook Github Bot committed 2018-08-04 09:47:29 -07:00
1 parent da6a5e0439
commit 5d0b51b107
2 files changed
+19 -1

No files matched your search

@@ -24,6 +24,8 @@ namespace react {
* http://en.cppreference.com/w/cpp/language/rule_of_three
*/
#ifndef NDEBUG
Sealable::Sealable(): sealed_(false) {}
Sealable::Sealable(const Sealable &other): sealed_(false) {};
@@ -40,7 +42,7 @@ Sealable &Sealable::operator=(const Sealable &other) {
Sealable &Sealable::operator=(Sealable &&other) noexcept {
ensureUnsealed();
return *this;
};
}
void Sealable::seal() const {
sealed_ = true;
@@ -56,5 +58,7 @@ void Sealable::ensureUnsealed() const {
}
}
#endif
} // namespace react
} // namespace facebook