Pieter De Baets and Facebook Github Bot
53d5504f40
Stop requiring registration of callable JS modules
...
Reviewed By: AaaChiuuu
Differential Revision: D5229073
fbshipit-source-id: d6d1967982ae379733a7e9667515ca9f074aadd4
2017-06-13 05:46:31 -07:00
Aaron Chiu and Facebook Github Bot
a1321aedd7
add a bunch of debug log statements
...
Reviewed By: achen1
Differential Revision: D5216191
fbshipit-source-id: 8e8e05d4bcd8b2112fbd15b3809946f1caa0edbe
2017-06-09 15:49:57 -07:00
Ben Nham and Facebook Github Bot
2984628357
add marker surrounding entire native module creation
...
Reviewed By: javache
Differential Revision: D5200856
fbshipit-source-id: 35b0e627224d518126a1cfdd36d6af264dd186cf
2017-06-09 06:22:39 -07:00
Ben Nham and Facebook Github Bot
80bc07fd60
add support for multiple bridge listeners
...
Reviewed By: AaaChiuuu
Differential Revision: D5200830
fbshipit-source-id: 2a12267edddd2558146721e02a0b80d649755050
2017-06-09 06:22:39 -07:00
Pieter De Baets and Facebook Github Bot
a9e8b7bca5
Remove unused package_js.py
...
Reviewed By: AaaChiuuu
Differential Revision: D5200573
fbshipit-source-id: 5bc5cc66d3ce979a6ca2db9241e1de4eab45f234
2017-06-08 03:45:41 -07:00
Aaron Chiu and Facebook Github Bot
ce52f404f2
remove some markers
...
Reviewed By: fkgozali
Differential Revision: D5196382
fbshipit-source-id: b12b56a7f7d1c4309ebcb61e840cc570d87acf3b
2017-06-06 20:45:33 -07:00
Michał Gregorczyk and Facebook Github Bot
46b3a89a70
Stop SystraceMessage markers with SystraceMessage.endSection
...
Reviewed By: javache
Differential Revision: D5182628
fbshipit-source-id: f5112a434cb7564410b0e2e69840e45a0777a184
2017-06-06 11:20:47 -07:00
Pieter De Baets and Facebook Github Bot
964c3a1b7a
Don't include JNI dep in OSS build
...
Summary:
When circle is using Buck, it uses prebuilt native libraries. I added this dependency internally to avoid callers having to depend on it explicitly but it looks like that broken open-source.
Closes https://github.com/facebook/react-native/pull/14343
Differential Revision: D5191531
Pulled By: javache
fbshipit-source-id: 5397026daac085694b3320bf6d3e7b3f5d680691
2017-06-06 10:34:23 -07:00
Kathy Gray and Facebook Github Bot
3c89bafad5
Reducing lock contention in module creation
...
Reviewed By: javache
Differential Revision: D5147499
fbshipit-source-id: b420cc67ee97fd8cf4bb390098465f968478509f
2017-06-06 09:02:12 -07:00
Aaron Chiu and Facebook Github Bot
37536e93b7
properly clean up RN
...
Reviewed By: javache
Differential Revision: D5170608
fbshipit-source-id: 065cf4ba4244c26bf5fdf9f5183a6bb1295676ad
2017-06-02 23:47:37 -07:00
Aaron Chiu and Facebook Github Bot
888a1e63d5
remove unused var
...
Reviewed By: shergin
Differential Revision: D5175318
fbshipit-source-id: 61d75bb386918e297f26d8772a5463c257a1590a
2017-06-02 14:32:00 -07:00
Aaron Chiu and Facebook Github Bot
c57d7eaf43
remove unused file
...
Reviewed By: fkgozali
Differential Revision: D5168258
fbshipit-source-id: 2535aa5592d5cf49e94fd6999e8121ef97e42d39
2017-06-02 08:17:06 -07:00
Pieter De Baets and Facebook Github Bot
220ff2321a
Avoid calls to ReactBridge.staticInit being stripped
...
Reviewed By: michalgr
Differential Revision: D5166720
fbshipit-source-id: 15ce78b2bbafa9506e9023d7d931092ebd963eea
2017-06-01 13:47:40 -07:00
Pieter De Baets and Facebook Github Bot
bd5051adeb
Move xreact/jni to react/jni
...
Reviewed By: mhorowitz
Differential Revision: D5155612
fbshipit-source-id: 871a23916c0069498691dc0dd3c94fd2e404cec9
2017-06-01 05:53:25 -07:00
xiatian and Facebook Github Bot
c2eb9f4689
Update CatalystInstanceImpl.java
...
Summary:
This change is very simple, fix a wrong spelling.
Closes https://github.com/facebook/react-native/pull/14268
Differential Revision: D5153788
Pulled By: javache
fbshipit-source-id: a163e1032661f54a802b3bfcbdf802a80b88545d
2017-05-31 02:46:24 -07:00
Pieter De Baets and Facebook Github Bot
e9fc7311c4
Cleanup markers in getConstants
...
Summary:
* Only add the moduleName to the outer marker
* Include module init in the marker time
* Include the WritableNativeArray time in CONVERT_CONSTANTS
* Stop all markers from finally block in case of exception
Reviewed By: kathryngray
Differential Revision: D5031411
fbshipit-source-id: bf86ee3d59f2cb38866afd52e84af5699db1a003
2017-05-26 09:30:36 -07:00
Daniel Cestari and Facebook Github Bot
fe229f8104
Move to{HashMap,ArrayList} up to Readable{Map,Array}
...
Summary:
NativeReadable{Map,Array} classes have convenient to{HashMap,ArrayList}
methods that make it easier to interoperate with existing Java code
from within a ReactNative application (e.g., Native Module) ...
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
NativeReadable{Map,Array} classes have convenient to{HashMap,ArrayList}
methods that make it easier to interoperate with existing Java code
from within a ReactNative application (e.g., Native Module)
These changes make these same methods available to any code using
the Readable{Map,Array} interfaces, instead of forcing consumers to
cast their generic instances into the NativeReadable* equivalents
Moving this methods up to the interfaces also makes it easier to
write unit tests for Native Modules - using the JavaOnly{Map,Array}
implementations of Readable{Map,Array} - while still relying on the
to{HashMap,ArrayList} methods
* Write a native module that receives a JSON object as `ReadableMap` and a JSON array `ReadableArray`.
* Print out the result of `toHashMap` and `toArrayList`.
* Make sure `NativeReadable{Map,Array}` works:
* Call the native module's method from JavaScript, passing an `Object` and an `Array`.
* Compare the printed values with the passed content.
* Make sure `JavaOnly{Map,Array}` works:
* Call the native module's method from the Java code and pass a `JavaOnlyMap` and a `JavaOnlyArray`.
* Compare the printed values with the passed content.
**Please advise if there is an automated test suite where I could add a case for this.**
Closes https://github.com/facebook/react-native/pull/14072
Differential Revision: D5123120
Pulled By: javache
fbshipit-source-id: 343f4396b99e03ecaf47993db6955d7932152f77
2017-05-24 13:01:00 -07:00
Pieter De Baets and Facebook Github Bot
275ba316c3
Remove unused MessageQueueThreadRegistry
...
Reviewed By: astreet
Differential Revision: D5111966
fbshipit-source-id: 2d96c0fe0bb8f7e5c88e200dc09feee265c24890
2017-05-24 10:16:32 -07:00
Kathy Gray and Facebook Github Bot
f46eaa30cf
Provide sync vs async interface for bundle loading via parameter
...
Reviewed By: javache
Differential Revision: D5104317
fbshipit-source-id: ffacb57d85c24795a3acc2faba2ff5824cc739b2
2017-05-24 07:31:36 -07:00
Kevin Gozali and Facebook Github Bot
3d3f74dc72
move @ReactMethod to the codegen'ed class so impl class don't need it anymore
...
Reviewed By: javache
Differential Revision: D5074121
fbshipit-source-id: 1b23a5d26ffe27c5093677ae7ecca424b232c8aa
2017-05-22 11:46:07 -07:00
Alex Kotliarskyi and Facebook Github Bot
3f8af2deee
Better context for "Calling JS function after bridge has been destroyed" warning
...
Reviewed By: AaaChiuuu
Differential Revision: D5091701
fbshipit-source-id: 9bf66cf35ffc3ade82a0ee61227760f0946d410d
2017-05-18 17:02:06 -07:00
Kathy Gray and Facebook Github Bot
cc16830cfb
Clean up package and imports left over from bridge merge
...
Reviewed By: javache
Differential Revision: D5077810
fbshipit-source-id: 2f569bfc9d0c45d2ca93b6e036efdaec9511633c
2017-05-17 07:46:53 -07:00
Aaron Chiu and Facebook Github Bot
c7317c5e61
make the CREATE_MODULE marker actually end
...
Reviewed By: fkgozali
Differential Revision: D5024378
fbshipit-source-id: 6f25ecd15e25a6d9aabaa52013c2abe24a3f8fb9
2017-05-11 20:00:21 -07:00
Kathy Gray and Facebook Github Bot
8b53a2b29b
Merging cxxbridge and bridge packages
...
Reviewed By: javache
Differential Revision: D5027875
fbshipit-source-id: 47e081069d4219bdb29f63ce8a78c1f31a590da7
2017-05-11 03:50:52 -07:00
Aaron Chiu and Facebook Github Bot
82c4b9f0b7
bump up priority of RN threads during startup
...
Reviewed By: shergin, yungsters
Differential Revision: D5002320
fbshipit-source-id: 8467370940d3742266b3bf319e9a38ae22eab98e
2017-05-08 11:31:19 -07:00
Aaron Chiu and Facebook Github Bot
83a58f6c4f
assert on UIBackground thread if UIBackground thread is available
...
Reviewed By: raluca-elena
Differential Revision: D5008046
fbshipit-source-id: 033b9ee76b331f6a4abcf4070e1a3206d7a8a422
2017-05-04 21:49:45 -07:00
Aaron Chiu and Facebook Github Bot
d353b75c12
log timespan of ATTACH_MEASURED_ROOT_VIEWS
...
Reviewed By: alexeylang
Differential Revision: D5002268
fbshipit-source-id: 530f5004e5d6f256ee000533599abb8942a76015
2017-05-04 17:48:07 -07:00
Ben Nham and Facebook Github Bot
cc3d034460
make ReactMarker initialization one-shot
...
Reviewed By: AaaChiuuu
Differential Revision: D4996560
fbshipit-source-id: 020a850f72a2b5c2327b904cac3245d39e114508
2017-05-03 15:04:38 -07:00
Aaron Chiu and Facebook Github Bot
989eb985b3
measure time spent before RUN_JS_BUNDLE
...
Reviewed By: alexeylang
Differential Revision: D4989216
fbshipit-source-id: 4996c934931636eadbef97d5c7f51a5907e773fb
2017-05-03 07:08:16 -07:00
Minjang Kim and Facebook Github Bot
39c73a842f
A (better) fix for t17513908: IG(Android) crash when tapping "Comments" at Settings
...
Reviewed By: martinbigio
Differential Revision: D4956022
fbshipit-source-id: 0f9cc1c9ecf28c95fe192f41fd3e75cd7409dd27
2017-04-26 16:32:46 -07:00
Andrew Y. Chen and Facebook Github Bot
324018061b
Fix NoSuchMethodError for Inspector#Page's constructor
...
Reviewed By: AaaChiuuu
Differential Revision: D4946388
fbshipit-source-id: 1c86e9701f26bc22af81050b300a2d6fd96a11a1
2017-04-25 18:15:32 -07:00
Aaron Chiu and Facebook Github Bot
513da6fcf2
enable the usage of the BGUI thread
...
Reviewed By: javache
Differential Revision: D4928729
fbshipit-source-id: 2a3baa01856cb7145d5f0155da0b959c330b7425
2017-04-25 16:17:05 -07:00
Pieter De Baets and Facebook Github Bot
34bc6bd2ae
Drop support for webworkers
...
Reviewed By: AaaChiuuu
Differential Revision: D4916449
fbshipit-source-id: a447233d3b7cfee98db2ce00f1c0505d513e2429
2017-04-25 05:37:54 -07:00
Aaron Chiu and Facebook Github Bot
6138e20379
give us the ability to create a background UI thread
...
Reviewed By: javache
Differential Revision: D4928689
fbshipit-source-id: 94fa5f3f7c047ad816c7699dcc8bebf9e751b282
2017-04-21 05:30:22 -07:00
Aaron Chiu and Facebook Github Bot
97a86634f7
lower thread priority of native module and JS thread
...
Reviewed By: achen1
Differential Revision: D4921012
fbshipit-source-id: 71df4ab0614f20f092b992c07e828eb5ad951159
2017-04-20 15:35:58 -07:00
Aaron Chiu and Facebook Github Bot
350b6c6d7f
don't run setupReactContext() on UI thread
...
Reviewed By: achen1
Differential Revision: D4816125
fbshipit-source-id: e1da5de166bc29d635ffa22e8747a5b61eaf1491
2017-04-20 01:30:59 -07:00
Andrew Y. Chen and Facebook Github Bot
1dc0f7e994
Instrumentation tests for apps that provide a testPayload
...
Reviewed By: AaaChiuuu
Differential Revision: D4873849
fbshipit-source-id: b5235b952faea2e42fb4292fac4ca409e22ecb56
2017-04-17 15:00:44 -07:00
Kathy Gray and Facebook Github Bot
78ab4ee893
Delay module creation on call for constants when module has none
...
Reviewed By: AaaChiuuu
Differential Revision: D4810252
fbshipit-source-id: b2b98c3a8355dbb5775f254f25304a21f0bfee5b
2017-04-10 03:16:36 -07:00
Kathy Gray and Facebook Github Bot
678679e009
Separate findMethods from BaseJavaModule
...
Reviewed By: javache
Differential Revision: D4795087
fbshipit-source-id: 6d135a409d463940a5a0aabbc85682ed61420ae3
2017-04-10 03:16:36 -07:00
Benjamin Jaeger and Facebook Github Bot
e154117f37
Add proguard rules to bridge BUCK
...
Summary:
prevents reflected classes from being stripped/obfuscated
Depends on D4830910
Reviewed By: mhorowitz
Differential Revision: D4835688
fbshipit-source-id: 5b85668f92ed4ae5cebc9902ec60f6d5d6299bd4
2017-04-07 11:46:12 -07:00
Marc Horowitz and Facebook Github Bot
0b2ac0ada8
Support narrower module dependencies
...
Reviewed By: javache
Differential Revision: D4772632
fbshipit-source-id: 615bf8998a3817364d0f8bd435c95c2c1f1bebed
2017-03-31 01:00:52 -07:00
Kathy Gray and Facebook Github Bot
f804af27c2
Make bridge load module lazy
...
Reviewed By: javache
Differential Revision: D4762575
fbshipit-source-id: fc3be786640b8c42664d7b357ab0fe197006b28b
2017-03-29 02:35:59 -07:00
Danny Liu and Facebook Github Bot
63035a4c08
replace string comparison with enum
...
Summary:
This change change the interface of reactmarker to use enum type and ReactMarker would still support logMarker(string, string) with addtional support for logMarker(ReactMarkerConstants, string).
Also moved some markers into the enum.
Reviewed By: fkgozali
Differential Revision: D4773600
fbshipit-source-id: 336ba79bb9514d3146bdda177861743ae51424ab
2017-03-28 16:24:44 -07:00
Aaron Chiu and Facebook Github Bot
e2204c5ccb
measure delay of calling into UI thread when setting up ReactContext
...
Reviewed By: yungsters
Differential Revision: D4736627
fbshipit-source-id: 6d425ef0ad7bbd54296a619009136c929cb16030
2017-03-25 09:52:16 -07:00
Marc Horowitz and Facebook Github Bot
6410e256c5
Decouple module callback mechanism from CatalystInstance
...
Summary:
Create a JSInstance superinterface which doesn't include all
the lifecycle stuff.
Reviewed By: AaaChiuuu
Differential Revision: D4614410
fbshipit-source-id: 16047bbcb1bb69bf36a0a13ef68f3a6aa396a991
2017-03-14 15:35:01 -07:00
Aaron Chiu and Facebook Github Bot
95b61925b3
measure time between building ReactInstanceManager and creating ReactContext
...
Reviewed By: alexeylang
Differential Revision: D4705021
fbshipit-source-id: 555ad512aed5b44165091a4bcc25a8a5564d55d3
2017-03-14 13:10:23 -07:00
Aaron Chiu and Facebook Github Bot
70e4a58d5b
measure conversion of Java Map to WritableNativeMap for each NativeModule
...
Reviewed By: fkgozali
Differential Revision: D4688690
fbshipit-source-id: 871b3f5ab141d7f63ec15b06e44a2c398603d757
2017-03-10 22:00:48 -08:00
Aaron Chiu and Facebook Github Bot
b085215237
move NativeModule initialization off UI thread
...
Summary: Initializing natives modules on the UI thread blocks the JS thread if the UI thread is busy.
Reviewed By: yungsters
Differential Revision: D4611211
fbshipit-source-id: cd4fb9cb5e52a478b6692b784cfd9e3bf34c0d34
2017-03-06 21:15:54 -08:00
Aaron Chiu and Facebook Github Bot
d2050a35dd
log onHostResume and onHostPause times
...
Reviewed By: alexeylang
Differential Revision: D4640631
fbshipit-source-id: fe55368b152c96ce631280143d59923aa2e628d3
2017-03-02 22:46:52 -08:00
Aaron Chiu and Facebook Github Bot
9f68d95943
log native module initialization time
...
Reviewed By: alexeylang
Differential Revision: D4640369
fbshipit-source-id: 9d1ec353d9b8c4bccb5eedea1fc5d0f6cb414985
2017-03-02 16:01:52 -08:00