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
This commit is contained in:
Valentin Shergin 2017-12-03 20:03:23 -08:00 committed by Facebook Github Bot
parent 11a2a35c63
commit 081f7d14ad
1 changed files with 4 additions and 2 deletions

View File

@ -211,6 +211,7 @@
- (void)_setStage:(RCTSurfaceStage)stage
{
RCTSurfaceStage updatedStage;
{
std::lock_guard<std::mutex> 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