mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
let PointerValue::invalidate() be noexcept (#47354)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47354 `PointerValue::invalidate()` is called from `Pointer` destructor, which is implicitly `noexcept`, and from `Pointer` move-assignment operator, which is now `noexcept`. Reviewed By: neildhar Differential Revision: D65271399 fbshipit-source-id: 26fd9707e4389da78537d0d607adaef0c68690ca
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7a6c7a462a
commit
f01b47257a
@@ -94,7 +94,7 @@ class JSCRuntime : public jsi::Runtime {
|
||||
const std::atomic<bool>& ctxInvalid,
|
||||
JSValueRef sym);
|
||||
#endif
|
||||
void invalidate() override;
|
||||
void invalidate() noexcept override;
|
||||
|
||||
JSGlobalContextRef ctx_;
|
||||
const std::atomic<bool>& ctxInvalid_;
|
||||
@@ -114,7 +114,7 @@ class JSCRuntime : public jsi::Runtime {
|
||||
#else
|
||||
JSCStringValue(JSStringRef str);
|
||||
#endif
|
||||
void invalidate() override;
|
||||
void invalidate() noexcept override;
|
||||
|
||||
JSStringRef str_;
|
||||
#ifndef NDEBUG
|
||||
@@ -135,7 +135,7 @@ class JSCRuntime : public jsi::Runtime {
|
||||
#endif
|
||||
);
|
||||
|
||||
void invalidate() override;
|
||||
void invalidate() noexcept override;
|
||||
|
||||
JSGlobalContextRef ctx_;
|
||||
const std::atomic<bool>& ctxInvalid_;
|
||||
@@ -506,7 +506,7 @@ JSCRuntime::JSCSymbolValue::JSCSymbolValue(
|
||||
#endif
|
||||
}
|
||||
|
||||
void JSCRuntime::JSCSymbolValue::invalidate() {
|
||||
void JSCRuntime::JSCSymbolValue::invalidate() noexcept {
|
||||
#ifndef NDEBUG
|
||||
counter_ -= 1;
|
||||
#endif
|
||||
@@ -531,7 +531,7 @@ JSCRuntime::JSCStringValue::JSCStringValue(JSStringRef str)
|
||||
: str_(JSStringRetain(str)) {}
|
||||
#endif
|
||||
|
||||
void JSCRuntime::JSCStringValue::invalidate() {
|
||||
void JSCRuntime::JSCStringValue::invalidate() noexcept {
|
||||
// These JSC{String,Object}Value objects are implicitly owned by the
|
||||
// {String,Object} objects, thus when a String/Object is destructed
|
||||
// the JSC{String,Object}Value should be released.
|
||||
@@ -566,7 +566,7 @@ JSCRuntime::JSCObjectValue::JSCObjectValue(
|
||||
#endif
|
||||
}
|
||||
|
||||
void JSCRuntime::JSCObjectValue::invalidate() {
|
||||
void JSCRuntime::JSCObjectValue::invalidate() noexcept {
|
||||
#ifndef NDEBUG
|
||||
counter_ -= 1;
|
||||
#endif
|
||||
|
||||
@@ -288,7 +288,7 @@ class JSI_EXPORT Runtime {
|
||||
// rvalue arguments/methods would also reduce the number of clones.
|
||||
|
||||
struct PointerValue {
|
||||
virtual void invalidate() = 0;
|
||||
virtual void invalidate() noexcept = 0;
|
||||
|
||||
protected:
|
||||
virtual ~PointerValue() = default;
|
||||
|
||||
Reference in New Issue
Block a user