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

Remove jsc dep from blob native library #25720

Closed

Conversation

janicduplessis
Copy link
Contributor

Summary

The blob native lib should not include JSC, otherwise it causes a crash when using Hermes.

This actually doesn't depend on the Hermes PR so we can land it now.

Changelog

[Android] [Fixed] - Remove jsc dep from blob native library

Test Plan

Tested that is no crash with hermes enabled and disabled

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. labels Jul 18, 2019
@react-native-bot react-native-bot added Bug Platform: Android Android applications. labels Jul 18, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdvacca is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@mdvacca mdvacca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, landing it

@mdvacca
Copy link
Contributor

mdvacca commented Jul 19, 2019

@janicduplessis The merge failed internally because BlobCollector.cpp depends on JSI:

java/com/facebook/react/modules/blob/jni/BlobCollector.cpp:22: error: undefined reference to 'facebook::jsi::HostObject::~HostObject()'

@janicduplessis
Copy link
Contributor Author

@mdvacca This is when building with BUCK right? Weird that it doesn't happen on oss CI. I tried updating the dep to jsi instead of jsiexecutor. Works when building locally with buck.

@mdvacca
Copy link
Contributor

mdvacca commented Jul 19, 2019

Yes, this is when building with BUCK, I will take a deeper look later today and I will let you know if we need any change in the PR

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@osdnk has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@cpojer
Copy link
Contributor

cpojer commented Jul 26, 2019

@osdnk I think the re-import failed. Could you import it again, try to fix up the BUCK file in phabricator and then land this PR? We need it before cutting 0.61.

@gengjiawen
Copy link
Contributor

@janicduplessis Need to resolve conflict.

@janicduplessis
Copy link
Contributor Author

janicduplessis commented Jul 26, 2019

the blob collector pr was reverted yesterday so we’ll have to figure that out first.

@janicduplessis
Copy link
Contributor Author

Going to work on re-landing the blob pr with this fix included instead.

facebook-github-bot pushed a commit that referenced this pull request Sep 18, 2019
… 2 (#26155)

Summary:
Reland #24767

The commit had to be reverted because it caused a crash when using remote debugging in chrome. This is normal since jsi is not available in that environment. The crash was caused by `jsContext.get()` being 0, then being dereferenced later in c++. We can simply skip initializing the blob collector in this case.

This also includes the fix from #25720 to fix a crash when using hermes.

## Changelog

[Android] [Fixed] - Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: #26155

Test Plan:
Test using RN tester with jsc and hermes
Test remote debugging

Reviewed By: mdvacca, fred2028

Differential Revision: D17072644

Pulled By: makovkastar

fbshipit-source-id: 079d1d43501e854297fbbe586ba229920c892584
mcuelenaere pushed a commit to getdelta/react-native that referenced this pull request Sep 24, 2019
… 2 (facebook#26155)

Summary:
Reland facebook#24767

The commit had to be reverted because it caused a crash when using remote debugging in chrome. This is normal since jsi is not available in that environment. The crash was caused by `jsContext.get()` being 0, then being dereferenced later in c++. We can simply skip initializing the blob collector in this case.

This also includes the fix from facebook#25720 to fix a crash when using hermes.

[Android] [Fixed] - Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: facebook#26155

Test Plan:
Test using RN tester with jsc and hermes
Test remote debugging

Reviewed By: mdvacca, fred2028

Differential Revision: D17072644

Pulled By: makovkastar

fbshipit-source-id: 079d1d43501e854297fbbe586ba229920c892584
grabbou pushed a commit that referenced this pull request Oct 11, 2019
… 2 (#26155)

Summary:
Reland #24767

The commit had to be reverted because it caused a crash when using remote debugging in chrome. This is normal since jsi is not available in that environment. The crash was caused by `jsContext.get()` being 0, then being dereferenced later in c++. We can simply skip initializing the blob collector in this case.

This also includes the fix from #25720 to fix a crash when using hermes.

## Changelog

[Android] [Fixed] - Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: #26155

Test Plan:
Test using RN tester with jsc and hermes
Test remote debugging

Reviewed By: mdvacca, fred2028

Differential Revision: D17072644

Pulled By: makovkastar

fbshipit-source-id: 079d1d43501e854297fbbe586ba229920c892584
douglowder pushed a commit to react-native-tvos/react-native-tvos that referenced this pull request Dec 11, 2019
… 2 (#26155)

Summary:
Reland facebook/react-native#24767

The commit had to be reverted because it caused a crash when using remote debugging in chrome. This is normal since jsi is not available in that environment. The crash was caused by `jsContext.get()` being 0, then being dereferenced later in c++. We can simply skip initializing the blob collector in this case.

This also includes the fix from facebook/react-native#25720 to fix a crash when using hermes.

## Changelog

[Android] [Fixed] - Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: facebook/react-native#26155

Test Plan:
Test using RN tester with jsc and hermes
Test remote debugging

Reviewed By: mdvacca, fred2028

Differential Revision: D17072644

Pulled By: makovkastar

fbshipit-source-id: 079d1d43501e854297fbbe586ba229920c892584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants