Commit Graph

67 Commits

Author SHA1 Message Date
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