Theo Yaung
ac74d2a38b
Refactor interfaces
...
Reviewed By: johnislarry
Differential Revision: D4844786
fbshipit-source-id: f348b8d5078643636343f6ea099b200f519fbc40
2017-05-02 21:31:41 -07:00
Pieter De Baets
34bc6bd2ae
Drop support for webworkers
...
Reviewed By: AaaChiuuu
Differential Revision: D4916449
fbshipit-source-id: a447233d3b7cfee98db2ce00f1c0505d513e2429
2017-04-25 05:37:54 -07:00
Alexey Lang
1bc9d448f5
Port perf metrics used in RCTBatchedBridge
...
Reviewed By: javache
Differential Revision: D4938279
fbshipit-source-id: c927261ff96c2eb07b7303ae96aae7600f2947f1
2017-04-25 02:32:25 -07:00
Martin Kralik
5f37483466
Revert D4840716: Refactor interfaces
...
Differential Revision: D4840716
fbshipit-source-id: 1b6a6050d78ccbbd3c817621df1c1c989594fdb1
2017-04-06 06:03:10 -07:00
Theo Yaung
fd99330b6c
Refactor interfaces
...
Reviewed By: johnislarry
Differential Revision: D4840716
fbshipit-source-id: 1a82437c81ce5b767efd39ab0716998bab4f5363
2017-04-06 00:04:06 -07:00
Marc Horowitz
6dc3a83e88
Don't load native module support as part of the initial CS bundle
...
Reviewed By: javache
Differential Revision: D4720386
fbshipit-source-id: cd8b6137aaff2d907adf089060bf7d356cd2f437
2017-03-20 13:25:33 -07:00
Marc Horowitz
e622d51e20
Support ModuleHolder-based lazy init of C++ modules with C++ bridge on android
...
Reviewed By: AaaChiuuu
Differential Revision: D4614479
fbshipit-source-id: 109ac34b8688f0113675e4a4479d1ddcc6169ed4
2017-03-14 15:35:01 -07:00
Ashok Menon
bf429f03a9
Get rid of code gated behind `JSC_HAS_EXTERNAL_CACHE`
...
Reviewed By: bnham
Differential Revision: D4608754
fbshipit-source-id: 9214c4d20720e5aa1cd65381a4837ff06943376e
2017-02-27 14:04:57 -08:00
Ashok Menon
a0f2ca8668
Migrating over CompiledSourceCode to new SourceProvider APIs.
...
Reviewed By: michalgr
Differential Revision: D4598042
fbshipit-source-id: ac6460c9156cc72e7925edac675a0b6ed57196f5
2017-02-23 11:45:57 -08:00
Ashok Menon
1635c02e92
Simplifying Struct definition.
...
Summary:
Since we are reading from a file, we should make sure this struct is packed, just in case we change it down the line and the compiler decides it might want to introduce padding, we're now protected against that.
There was also a discussion about the fact that people might use `ptr += sizeof(BundleHeader)` as an idiom in their code, which would currently be incorrect, if padding was introduced at the end of the file. Actually, it remains incorrect to do that now, because a RAM bundle header is a different size to a BC Bundle header. If people are properly testing their code, they should spot this pretty quickly, because it will always be an incorrect thing to do with a RAM bundle, so this isn't as bad as previously thought: where the code only succeeds when the compiler deigns to not pad the struct at the end.
This diff also cleans up how headers are initialised. `BundleHeader` has a constructor that explicitly zero-initialises it so we can rely on the default initializer to do the right thing now.
Reviewed By: mhorowitz
Differential Revision: D4572032
fbshipit-source-id: 7dc50cfa9438dfdfb9f842dc39d8f15334813c63
2017-02-20 04:30:19 -08:00
Alexey Lang
ba029becbe
Support QuickPerformanceLogger.js in CxxBridge
...
Reviewed By: javache
Differential Revision: D4573567
fbshipit-source-id: 3ef9da38fb178cf4c1400b4a991a9e85f3ec3755
2017-02-17 06:00:54 -08:00
Ashok Menon
14dc219810
Deleting Optimized Bundle!
...
Reviewed By: javache
Differential Revision: D4566164
fbshipit-source-id: 1fbd3dd04f24399e93e3c6ec58956e6e18f1683f
2017-02-16 13:30:55 -08:00
Pieter De Baets
61785ee00c
Support BC in JSCExecutor on iOS
...
Reviewed By: amnn
Differential Revision: D4558676
fbshipit-source-id: 1ec2b1a5a8df08074ba06162ab2585f02d1d214b
2017-02-15 07:14:57 -08:00
Pieter De Baets
8987d86718
Fix error handling for nested exceptions
...
Reviewed By: mhorowitz
Differential Revision: D4551110
fbshipit-source-id: e593c1ef0dea27e95a387bcde6250aeb22d2e9cc
2017-02-15 06:15:11 -08:00
Pieter De Baets
4d2512aef9
Replace MethodCallResult with folly::Optional
...
Reviewed By: AaaChiuuu
Differential Revision: D4481987
fbshipit-source-id: 945dd671eb2482f3c6b626192aa2181c5bfd906f
2017-02-02 05:13:33 -08:00
Marc Horowitz
5bc7e3934b
make JSCExecutor compile on iOS without android hacks
...
Reviewed By: javache
Differential Revision: D4434041
fbshipit-source-id: 88439384b1471ea5bd96d7cc39e681ddd3959243
2017-02-01 14:14:32 -08:00
Marc Horowitz
ad549c067a
small fixes to ReactCommon
...
Summary: unneeded or overly generic header files, stuff like that.
Reviewed By: javache
Differential Revision: D4434029
fbshipit-source-id: f25c702e7fc8d8debbd865cf3822696bf9b61c81
2017-02-01 14:14:32 -08:00
Pieter De Baets
919e49a8b8
Pass expanded folly::dynamic as argument to sync nativeHook
...
Reviewed By: mhorowitz
Differential Revision: D4409865
fbshipit-source-id: f99e02e36bf691fa5b4a5affce1fa4fd4cf321a6
2017-01-30 06:43:48 -08:00
Pieter De Baets
a407ff94ee
Add option to start sampling profiler on app launch
...
Reviewed By: mhorowitz
Differential Revision: D4415989
fbshipit-source-id: 30704c2b618656cb7cc0ccdf87dec315b30b62f3
2017-01-25 14:43:30 -08:00
Pieter De Baets
e97ffc469c
Use NoAutomaticPrototype everywhere
...
Reviewed By: michalgr
Differential Revision: D4462794
fbshipit-source-id: 53585741c1d35ca31e3429f2de56455ea5dea902
2017-01-25 11:43:30 -08:00
Dan Caspi
ad0493c6c2
Fixing a crash caused by D4393955
...
Reviewed By: javache
Differential Revision: D4403858
fbshipit-source-id: c930aa108d27c1bd1b36364530d2953bcd4664ad
2017-01-11 09:43:34 -08:00
Stephen Girdlestone
a0dd54b4d7
Adding method for JSCreateSourceCodeFromFile.
...
Reviewed By: amnn
Differential Revision: D4365790
fbshipit-source-id: b62ee9c7d3fa3f89c22a10a6fde21cd9c30fceb2
2017-01-11 06:13:28 -08:00
Dan Caspi
b50f55026a
Adding support in the new RN bridge on iOS
...
Differential Revision: D4393955
fbshipit-source-id: e5f3fb6773908678773a5dd4fdea568bcc200336
2017-01-10 11:28:44 -08:00
Ashok Menon
da428d6c3d
Exposing Recoverable Errors
...
Differential Revision: D4383792
fbshipit-source-id: e6d0f57fcaacf242e95bfcf589a4fa840c317fe5
2017-01-10 07:13:40 -08:00
Ashok Menon
8819bef56b
Getting rid of File descriptor based loading APIs
...
Reviewed By: javache
Differential Revision: D4333725
fbshipit-source-id: ba8591c7380e8eb90660a912f6fc86fc3d2d4774
2017-01-10 07:13:40 -08:00
Ashok Menon
6ca6b4988a
Propagate Load Errors through JSExecutor API
...
Reviewed By: mhorowitz
Differential Revision: D4315204
fbshipit-source-id: ae282e0a0398a602dd790de3a2b1adb5fdc1f50c
2016-12-17 04:58:31 -08:00
Ashok Menon
fb5678e33a
Generalising JSCompiledSourceError to JSLoadSourceError
...
Reviewed By: javache
Differential Revision: D4312888
fbshipit-source-id: de38066247f52eeb64efa48807882b96e3737d0e
2016-12-12 08:43:43 -08:00
Ashok Menon
f3dbf3ea89
Removing default parameters to functions in `JSBase.h`
...
Differential Revision: D4309440
fbshipit-source-id: f4f795d5736c6d6e5297e2773538df66139e9b84
2016-12-10 05:58:31 -08:00
Michał Gregorczyk
46919095aa
Simplify bundle loading a little bit.
...
Reviewed By: amnn
Differential Revision: D4306559
fbshipit-source-id: 9733c508aa5a905251e96855794a59ef79d61cfa
2016-12-09 17:58:32 -08:00
Ashok Menon
30213757d9
Making CompiledSourceError a C enum, to keep `JSBase.h` as a C header
...
Reviewed By: javache
Differential Revision: D4299281
fbshipit-source-id: 14cdc6d4502a70300919dc6a98a5f274076134c7
2016-12-08 16:28:27 -08:00
Ashok Menon
624104fd0c
Listen to Compiled Source Errors in JSCExecutor fallback code.
...
Reviewed By: javache
Differential Revision: D4284537
fbshipit-source-id: 247717ef55fb6bc0a34a01626c790bd23fd18598
2016-12-08 05:13:40 -08:00
Pieter De Baets
0e6895f270
Fix typo
...
Reviewed By: amnn
Differential Revision: D4258150
fbshipit-source-id: d41c5426b801d32db6099cf8b29596689f369ba6
2016-12-01 06:58:31 -08:00
Pieter De Baets
cb3e575deb
Allow bridge delegate to specify whether to use custom JSC wrapper
...
Reviewed By: mhorowitz
Differential Revision: D4197657
fbshipit-source-id: 09e050f802b41c9a7016456c25381018b2123553
2016-11-23 03:58:41 -08:00
Pieter De Baets
3f50a887d9
Move JSC API usage in ReactCommon to our wrapper methods
...
Reviewed By: bnham
Differential Revision: D4197374
fbshipit-source-id: 107a129cff35dddfe06104b607441ad412f83d90
2016-11-22 06:13:33 -08:00
Pieter De Baets
2a04569926
Fix usage of old String constructor
...
Reviewed By: amnn
Differential Revision: D4204575
fbshipit-source-id: ea0309ec9bf2c8a4c480188efb00408fcc399e2e
2016-11-18 07:28:24 -08:00
Pieter De Baets
20514e3482
Add JSContextRef param to String constructor
...
Reviewed By: bnham
Differential Revision: D4197300
fbshipit-source-id: 306ffc85e3ced24047b68499f7cdf5e2d31fc052
2016-11-18 06:28:48 -08:00
Pieter De Baets
674d86cdcb
Add some more helper methods to Value
...
Reviewed By: mhorowitz
Differential Revision: D4197278
fbshipit-source-id: 9a538ff2747d32a54d42627a9f78e4a348dce639
2016-11-18 06:28:48 -08:00
Ashok Menon
9e00a42fd7
Experimental App Bundle API
...
Reviewed By: michalgr
Differential Revision: D4198629
fbshipit-source-id: b96a4b3ad3e5ab6b4cb8892442c6077edf7058a3
2016-11-18 05:13:31 -08:00
Ashok Menon
79fa6d41a1
Rename JSBigMmapString -> JSBigOptimizedBundleString
...
Summary:
`JSBigMmapString` needs to know too much about the details of the "optimized bundle" format. In honour of this fact, I'm renaming it to `JSBigOptimizedBundleString`. In a following diff, I will introduce a new class just for File-backed Strings, whose only responsibility is dealing with an mmaped region.
This diff already pulls in some fixes for formatting reference and pointer declarations from the linter.
Reviewed By: michalgr
Differential Revision: D4189391
fbshipit-source-id: b376c2a8d9ae5b83575da8457e607bbbfc648ebd
2016-11-16 15:13:39 -08:00
Ashok Menon
f22dfa3efb
Make Bytecode Header errors non-fatal
...
Reviewed By: michalgr
Differential Revision: D4182575
fbshipit-source-id: 1e7c229bb6d0bdbfdfc01e93af53441ba2cba9f9
2016-11-16 15:13:39 -08:00
Pieter De Baets
96cf9bb0c0
Support null messageQueueThread in JSCExecutor
...
Reviewed By: michalgr
Differential Revision: D4119253
fbshipit-source-id: 2956434451bf4e649cfe4c0ee0a9b7339a5422a3
2016-11-02 14:28:36 -07:00
Alexander Blom
156e5d9837
Add on-device JSC inspector
...
Summary:
Introduces the inspector library supporting the Chrome Debugging Protocol for JavaScriptCore. Eventually this will mean that it is possible to attach
the Chrome inspector directly to the JSC instance running on the device. This library doesn't define the actual transport but leaves that up to the platform
layer.
The main entry point (and the only exported header) is `Inspector.h`.
This diff only introduces the basics supporting the `Schema` and `Inspector` domains meaning it doesn't have any features yet. These will come in following
diffs.
Reviewed By: michalgr
Differential Revision: D4021490
fbshipit-source-id: 517fd9033051c11ba97d312b16382445ae85d3f3
2016-11-02 12:29:14 -07:00
Pieter De Baets
4082a54649
Don't mask exceptions generated from loadModule
...
Reviewed By: davidaurelio
Differential Revision: D4112447
fbshipit-source-id: e9b3a5cefb166fe00c04b6126c9878e71f1413ec
2016-11-01 16:13:33 -07:00
Alexander Blom
ddb8cb7cf0
Move JSCHelpers.h and Value.h into separate package
...
Reviewed By: javache
Differential Revision: D3950748
fbshipit-source-id: 6315ea07f3217b485aeb4374b5f6e36333957848
2016-11-01 11:44:10 -07:00
Ben Nham
c089761f9b
Use JSCExecutor to manage loading js script in JSContext
...
Reviewed By: jaegs
Differential Revision: D4021624
fbshipit-source-id: 8e46052ad246e842a88715d55059a233196a4a6b
2016-10-31 15:13:49 -07:00
Pieter De Baets
8355ef91ad
Add a default context name to RCTJSCExecutor
...
Reviewed By: mmmulani
Differential Revision: D4015748
fbshipit-source-id: 077287b8438aa13f2a1479d68eacb0662bf295aa
2016-10-14 11:43:43 -07:00
Pieter De Baets
9ed9bca0bf
Lazily instantiate native modules
...
Summary: Instead of sending a list of modules over to JS on startup (and actually blocking script execution) instead provide a proxy object that constructs each of these lazily.
Reviewed By: lexs
Differential Revision: D3936979
fbshipit-source-id: 71bde822f01eb17a29f56c5e60e95e98e207d74d
2016-10-11 07:28:42 -07:00
Pieter De Baets
d7d89172c2
Expose ModuleRegistry on ExecutorDelegate
...
Differential Revision: D3944588
fbshipit-source-id: f8450a6735e1f6283c3bfe9d2ce883327172621c
2016-10-03 05:13:38 -07:00
Pieter De Baets
5b52dab781
Remove follySupport.h
...
Reviewed By: lexs
Differential Revision: D3944918
fbshipit-source-id: 702907a12e3916f9d6edde7362416188df909d70
2016-09-30 12:28:41 -07:00
Pieter De Baets
6ee319d8eb
Only configure nativeInjectHMRUpdate in DEBUG builds
...
Reviewed By: martinbigio
Differential Revision: D3944601
fbshipit-source-id: 8b98b7ae9a10c1e95d0ae80f6bbd90675d7c3ef5
2016-09-30 12:28:41 -07:00
Michał Gregorczyk
67f9d92478
Do not use bare file descriptors
...
Reviewed By: nadavrot
Differential Revision: D3945330
fbshipit-source-id: f3a28e2632c7f17a0b6394f3dd3de183bc9e97af
2016-09-30 12:13:51 -07:00
Michał Gregorczyk
b1fdac47b5
Wire compiled bundle API
...
Differential Revision: D3887878
fbshipit-source-id: 212fc3188f059d7378ecd61bb5e31fc87a857e8a
2016-09-29 09:13:39 -07:00
Marc Horowitz
d7a2d3a957
Add API for sync function calls
...
Reviewed By: javache
Differential Revision: D3897526
fbshipit-source-id: cadead316996ca7c1dd2b0d60d87945f5452640c
2016-09-26 16:14:11 -07:00
Marc Horowitz
971cda8794
Move thread jump for js loading into NativeToJSBridge, out of platform code
...
Reviewed By: javache
Differential Revision: D3906009
fbshipit-source-id: b9782a6c209e3c1626899dac7fd50233cdef87f3
2016-09-26 16:14:10 -07:00
leeight
7fd9e77837
Remove duplicate call delegate->moduleNames()
...
Summary: Closes https://github.com/facebook/react-native/pull/9962
Differential Revision: D3923050
fbshipit-source-id: 59e05e673835beb7409512195170c9a1e20a9ea1
2016-09-26 01:43:41 -07:00
Pieter De Baets
145109fc6d
Remove additional JSON encoding for native->JS communication
...
Reviewed By: mhorowitz
Differential Revision: D3857323
fbshipit-source-id: 4386cc107b8a1425ecb7297b0f659f6c47f01a78
2016-09-19 04:44:12 -07:00
Marc Horowitz
3940f06211
Add more profiling, fix existing profiling, perf fix
...
Reviewed By: javache
Differential Revision: D3807467
fbshipit-source-id: 3ff6feebd6d7966952152bac708389506de721e6
2016-09-02 12:43:48 -07:00
Marc Horowitz
1d571c5ed5
Don't use the same throw for calling into JSC, and calling into native modules
...
Differential Revision: D3779181
fbshipit-source-id: 7fb17c9c90abd9302137dad3a326c6ce30e7ca86
2016-09-01 15:13:51 -07:00
Ben Nham
94ac3e4d08
fix static jsc build for ios
...
Reviewed By: dcaspi
Differential Revision: D3693192
fbshipit-source-id: dca500262e698e02c27c840e74c421ec6bc006fe
2016-08-10 04:28:26 -07:00
Michał Gregorczyk
5405aeb2a3
First step to boot rn apps with hot bytecode cache
...
Reviewed By: tadeuzagallo
Differential Revision: D3561565
fbshipit-source-id: dc1cf580d7b31f30939b180aec38d9b8d0dd0f58
2016-08-04 15:58:36 -07:00
Chris Hopman
e7fba4c123
Remove some throw specifications
...
Reviewed By: mhorowitz
Differential Revision: D3588394
fbshipit-source-id: 56e24f28b1f4eba2564007b395afcac6fa5cb209
2016-07-21 17:43:27 -07:00
Dan Caspi
654e4bed2e
Better folly::dynamic ==> JSValue conversion
...
Reviewed By: lexs
Differential Revision: D3347854
fbshipit-source-id: 95b81152d1b0d5fe41e01991c44f5d1110be7ddb
2016-07-20 04:28:37 -07:00
Lukas Piatkowski
edb9fce9c3
#6 Notify SamplingProfiler of the main MachineThread
...
Reviewed By: bnham
Differential Revision: D3503444
fbshipit-source-id: a2e9a692cd5badac5a15416844c8497f88021a5e
2016-07-15 11:58:31 -07:00
Michał Gregorczyk
3c0f428f05
Fix optimized bundle stuff.
...
Reviewed By: davidaurelio, tadeuzagallo
Differential Revision: D3563710
fbshipit-source-id: 2b0a982d388ee5f44b806f8e561ef49a3fd8c8ca
2016-07-14 15:28:46 -07:00
David Aurelio
df01215006
Reverted commit D3545345
...
Reviewed By: tadeuzagallo
Differential Revision: D3545345
fbshipit-source-id: d655918be7dcadaf8143800497e85f3de44bd48a
2016-07-14 10:58:27 -07:00
Michał Gregorczyk
1331e20db5
add API to CatalystInstanceImpl for executing optimized bundle
...
Reviewed By: tadeuzagallo
Differential Revision: D3545345
fbshipit-source-id: 538fec77b816c3fd767e8c2eda81c78971996b17
2016-07-12 08:13:32 -07:00
Tadeu Zagallo
5d06918d07
Add new FileSourceProvider
...
Summary: Add a new interface to JSC that allows loading a file lazily from disk, i.e. using mmap, instead of loading the whole file upfront and copying into the VM.
Reviewed By: michalgr
Differential Revision: D3534042
fbshipit-source-id: 98b193cc7b7e33248073e2556ea94ce3391507c7
2016-07-11 06:58:26 -07:00
Clement Genzmer
80c23ae324
Reverted commit D3207541
...
Reviewed By: michalgr
Differential Revision: D3207541
fbshipit-source-id: 36366188b7cb74c51d4aa974abd4a648498bcf78
2016-07-07 14:58:43 -07:00
Tadeu Zagallo
af24e8001a
Add new FileSourceProvider
...
Reviewed By: michalgr
Differential Revision: D3207541
fbshipit-source-id: d53599c3cf36ae7c89e85a29f637987bc7139159
2016-07-07 08:44:30 -07:00
Andy Street
f5345601d9
Add JSCHelper function to easily install native hooks outside of JSCExecutor
...
Summary: JSCExecutor has something like this, but for methods on JSCExecutor itself. Open to better ideas around how to share code
Reviewed By: lexs
Differential Revision: D3516314
fbshipit-source-id: 4b1265916c52d582bb0b9348e9b4a099f566d6c9
2016-07-07 04:58:47 -07:00
Chris Hopman
df6d18358e
Serialize params when making/queuing native call
...
Reviewed By: mhorowitz
Differential Revision: D3460507
fbshipit-source-id: a0600ffe3da89791af3eb64fc2973eb6aafa7d2b
2016-06-23 14:58:58 -07:00
Alexander Blom
d63d4f0e9c
Bind methods instead of using eval
...
Reviewed By: astreet
Differential Revision: D3417452
fbshipit-source-id: 437daa2dfcd01efb749465a94c1a72ce8a2cb315
2016-06-21 10:13:33 -07:00
Chris Hopman
1731598428
Add some (possibly temporary) noexcept/throw specifications
...
Reviewed By: mhorowitz
Differential Revision: D3435575
fbshipit-source-id: 93b60a5d6890d21db6b3726784bc6fd868af5ba0
2016-06-16 16:13:17 -07:00
Chris Hopman
5e8f1716fc
Build new bridge with gradle
...
Reviewed By: bestander
Differential Revision: D3324351
fbshipit-source-id: 41fa18a23c8661440a7deff244c93278f418e1d9
2016-05-27 16:13:37 -07:00