From 081f7d14aded077a7627404e5e2d48163a5707ad Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Sun, 3 Dec 2017 20:03:23 -0800 Subject: [PATCH] RCTSurface: Fixed problem in stage propagation Summary: We previously incorrectly communicated to the delegate changed fragment instead of compound value. Reviewed By: rsnara Differential Revision: D6367070 fbshipit-source-id: 373a7c14a79a4727a7e8f61178dea3ca16ea1f40 --- React/Base/Surface/RCTSurface.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/React/Base/Surface/RCTSurface.mm b/React/Base/Surface/RCTSurface.mm index 5884f84be..6cf991cef 100644 --- a/React/Base/Surface/RCTSurface.mm +++ b/React/Base/Surface/RCTSurface.mm @@ -211,6 +211,7 @@ - (void)_setStage:(RCTSurfaceStage)stage { + RCTSurfaceStage updatedStage; { std::lock_guard lock(_mutex); @@ -218,10 +219,11 @@ return; } - _stage = (RCTSurfaceStage)(_stage | stage); + updatedStage = (RCTSurfaceStage)(_stage | stage); + _stage = updatedStage; } - [self _propagateStageChange:stage]; + [self _propagateStageChange:updatedStage]; } - (void)_propagateStageChange:(RCTSurfaceStage)stage