diff --git a/React/Base/Surface/RCTSurface.mm b/React/Base/Surface/RCTSurface.mm index 67c56cb86dc01b..82781d05ebe572 100644 --- a/React/Base/Surface/RCTSurface.mm +++ b/React/Base/Surface/RCTSurface.mm @@ -567,18 +567,16 @@ - (void)uiManagerDidPerformMounting:(__unused RCTUIManager *)manager } } -- (BOOL)start +- (void)start { // Does nothing. // The Start&Stop feature is not implemented for regular Surface yet. - return YES; } -- (BOOL)stop +- (void)stop { // Does nothing. // The Start&Stop feature is not implemented for regular Surface yet. - return YES; } #pragma mark - Mounting/Unmounting of React components diff --git a/React/Base/Surface/RCTSurfaceProtocol.h b/React/Base/Surface/RCTSurfaceProtocol.h index c274df73b17d31..a645ae9eac25a7 100644 --- a/React/Base/Surface/RCTSurfaceProtocol.h +++ b/React/Base/Surface/RCTSurfaceProtocol.h @@ -68,13 +68,12 @@ NS_ASSUME_NONNULL_BEGIN @property (atomic, assign, readonly) CGSize intrinsicSize; #pragma mark - Start & Stop - /** * Starts or stops the Surface. * Those methods are a no-op for regular RCTSurface (for now), but all call sites must call them appropriately. */ -- (BOOL)start; -- (BOOL)stop; +- (void)start; +- (void)stop; @end diff --git a/React/Fabric/Surface/RCTFabricSurface.mm b/React/Fabric/Surface/RCTFabricSurface.mm index 12dd5dd4bc86e0..f3b44534707508 100644 --- a/React/Fabric/Surface/RCTFabricSurface.mm +++ b/React/Fabric/Surface/RCTFabricSurface.mm @@ -89,12 +89,12 @@ - (void)dealloc #pragma mark - Life-cycle management -- (BOOL)start +- (void)start { std::lock_guard lock(_surfaceMutex); if (_surfaceHandler->getStatus() != SurfaceHandler::Status::Registered) { - return NO; + return; } // We need to register a root view component here synchronously because right after @@ -108,15 +108,14 @@ - (BOOL)start [self _propagateStageChange]; [_surfacePresenter setupAnimationDriverWithSurfaceHandler:*_surfaceHandler]; - return YES; } -- (BOOL)stop +- (void)stop { std::lock_guard lock(_surfaceMutex); if (_surfaceHandler->getStatus() != SurfaceHandler::Status::Running) { - return NO; + return; } _surfaceHandler->stop(); @@ -126,8 +125,6 @@ - (BOOL)stop [self->_surfacePresenter.mountingManager detachSurfaceFromView:self.view surfaceId:self->_surfaceHandler->getSurfaceId()]; }); - - return YES; } #pragma mark - Immutable Properties (no need to enforce synchronization)