Skip to content

Commit

Permalink
RCTSurface: Fixed problem in stage propagation
Browse files Browse the repository at this point in the history
Summary: We previously incorrectly communicated to the delegate changed fragment instead of compound value.

Reviewed By: rsnara

Differential Revision: D6367070

fbshipit-source-id: 373a7c14a79a4727a7e8f61178dea3ca16ea1f40
  • Loading branch information
shergin authored and facebook-github-bot committed Dec 4, 2017
1 parent 11a2a35 commit 081f7d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions React/Base/Surface/RCTSurface.mm
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,19 @@ - (RCTSurfaceStage)stage

- (void)_setStage:(RCTSurfaceStage)stage
{
RCTSurfaceStage updatedStage;
{
std::lock_guard<std::mutex> lock(_mutex);

if (_stage & stage) {
return;
}

_stage = (RCTSurfaceStage)(_stage | stage);
updatedStage = (RCTSurfaceStage)(_stage | stage);
_stage = updatedStage;
}

[self _propagateStageChange:stage];
[self _propagateStageChange:updatedStage];
}

- (void)_propagateStageChange:(RCTSurfaceStage)stage
Expand Down

0 comments on commit 081f7d1

Please sign in to comment.