Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bridge] Check self.isValid in RCTBatchedBridge after initial script evaluation #2016

Closed
wants to merge 1 commit into from

Conversation

ide
Copy link
Contributor

@ide ide commented Jul 16, 2015

I noticed that sometimes the batched bridge would be valid before [self enqueueApplicationScript:url:onComplete:] but then become invalid in the completion callback. This diff checks self.isValid inside of the callback.

Test Plan: Load app a couple of times and see that my RCTJavaScriptDidLoadNotification observer is never notified by an invalid batched bridge.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 16, 2015
@tadeuzagallo
Copy link
Contributor

@facebook-github-bot import

@ide ide force-pushed the bridge-valid-check branch from 375da69 to 8675622 Compare August 27, 2015 09:35
@ide ide force-pushed the bridge-valid-check branch from 8675622 to e566f26 Compare September 15, 2015 00:12
@ide
Copy link
Contributor Author

ide commented Sep 15, 2015

friendly ping

@tadeuzagallo
Copy link
Contributor

Damn bot

@facebook-github-bot import

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1691615787734006/int_phab to review.

…evaluation

I noticed that sometimes the batched bridge would be valid before `[self enqueueApplicationScript:url:onComplete:]` but then become invalid in the completion callback. This diff checks `self.isValid` inside of the callback.

Test Plan: Load app a couple of times and see that my `RCTJavaScriptDidLoadNotification` observer is never notified by an invalid batched bridge.
@ide ide force-pushed the bridge-valid-check branch from e566f26 to af03e05 Compare September 23, 2015 23:21
@ide ide closed this in 7615d74 Sep 24, 2015
MattFoley pushed a commit to skillz/react-native that referenced this pull request Nov 9, 2015
Summary: I noticed that sometimes the batched bridge would be valid before `[self enqueueApplicationScript:url:onComplete:]` but then become invalid in the completion callback. This diff checks `self.isValid` inside of the callback.

Closes facebook#2016

Reviewed By: @​trunkagent, @jspahrsummers

Differential Revision: D2443438

Pulled By: @tadeuzagallo
Saadnajmi added a commit to FalseLobster/react-native that referenced this pull request Jan 9, 2024
@ide ide deleted the bridge-valid-check branch March 9, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants