Skip to content

fix(react-native-host): rename inner strongSelf to fix -Wshadow#4143

Open
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Saadnajmi:fix-wshadow-strongself-rename
Open

fix(react-native-host): rename inner strongSelf to fix -Wshadow#4143
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Saadnajmi:fix-wshadow-strongself-rename

Conversation

@Saadnajmi
Copy link
Copy Markdown
Contributor

The inner block in -setBridge: redeclares strongSelf, shadowing the outer strongSelf captured for the RCTExecuteOnMainQueue scope. With -Wshadow on this is a -Werror.

Rename the inner reference to innerStrongSelf so it no longer shadows the outer.

Description

The inner block in -setBridge: redeclares strongSelf, shadowing the outer strongSelf captured for the RCTExecuteOnMainQueue scope. With -Wshadow on this is a -Werror.

Rename the inner reference to innerStrongSelf so it no longer shadows the outer.

Test plan

Tested internally, where we use stricter xcconfigs.

The inner block in -setBridge: redeclares strongSelf, shadowing the outer
strongSelf captured for the RCTExecuteOnMainQueue scope. With -Wshadow on
this is a -Werror.

Rename the inner reference to innerStrongSelf so it no longer shadows the
outer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant