David Aurelio
5db7484e8d
Move `ScriptTag` and `RCTJSModulesUnbundle` to `cxxreact`
...
Reviewed By: javache
Differential Revision: D4213662
fbshipit-source-id: fc2ec9717c24fe77bb022a48777049f88173ebeb
2016-11-23 06:43:50 -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
e541d9b108
Define wrapper versions of all JSC methods
...
Reviewed By: bnham
Differential Revision: D4197369
fbshipit-source-id: 53869fe1b56010c8a5330025d06ef557369e4957
2016-11-22 06:13:33 -08:00
Michał Gregorczyk
2ca507bf9e
Remove supported platforms from JSC and all the things that depends on it
...
Reviewed By: bnham
Differential Revision: D4213580
fbshipit-source-id: 3830c15b0097030a4e4611aac814b12e1d6ae696
2016-11-21 16:43:31 -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
2de1c3507a
Introducing `JSBigFileString`
...
Reviewed By: michalgr
Differential Revision: D4189896
fbshipit-source-id: 0f3cebcd7e76d5c763c29ebc1119ae24b643e5ad
2016-11-16 15:13:39 -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
89d81b34db
Use folly for error checking
...
Summary: Small refactor, making error checking clearer.
Reviewed By: lexs
Differential Revision: D4189090
fbshipit-source-id: f3a24eacfe6dd154d29662f510ce19dbe55f89a6
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
Giuseppe Ottaviano
dc02907039
Fix a folly::dynamic deprecated pattern
...
Reviewed By: javache
Differential Revision: D4075622
fbshipit-source-id: 4a6b6c4068d762dce2b1535bfd9630e185f5489f
2016-10-26 09:43:56 -07:00
Nikhilesh Sigatapu
c67225818d
Add a way to access the underlying JavaScriptCore context
...
Summary:
**Motivation**
I'm working on a project that uses React Native and needs to add direct synchronous bindings to native stuff through the JavaScriptCore C API. This is because it's performance-sensitive and would benefit from the quickest JS->C path. It does this using cross-platform C++ code that works on both iOS and Android. Most of the infrastructure for getting access to the JSC context is already in React Native actually, just had to add a few more things.
(lexs you mentioned to tag you in this pull request)
**Test plan**
Modify the JavaScriptCore context through the `JSContextRef` returned (eg. add an object at global scope) and verify that it exists in JavaScript.
Closes https://github.com/facebook/react-native/pull/10399
Differential Revision: D4080945
Pulled By: lexs
fbshipit-source-id: 6659b7a01e09fd84475adde183c1d3aca2d4cf09
2016-10-26 03:43:44 -07:00
Scott Wolchok
3f472e0bfa
Fix cxxreact build error with -Wmissing-prototypes
...
Differential Revision: D4022143
fbshipit-source-id: 6afbd29a030ff51915cfb552f74737e9146b2ffd
2016-10-14 13:28:36 -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
Emil Sjolander
b7ded130df
Dont use explicit .so file name to support more platforms
...
Reviewed By: dreiss
Differential Revision: D3981166
fbshipit-source-id: 0b19f73e6de48a30613419ccc54735c968701532
2016-10-08 09:28:42 -07:00
Pieter De Baets
5200ac1ee9
Add check for nil nativeToJS bridge
...
Reviewed By: mhorowitz
Differential Revision: D3980922
fbshipit-source-id: ba8ba283cd186a28cd9d5c1c35d4828829864a6a
2016-10-07 08:13:38 -07:00
leeight
9a7e4b4902
Dump invalid json when call Value::fromJSON failed
...
Summary:
See #9117
Closes https://github.com/facebook/react-native/pull/10231
Differential Revision: D3974063
Pulled By: javache
fbshipit-source-id: 63d3ae02ae731cd5a63fcb3a645c612c57cbb8b4
2016-10-05 04:43:45 -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
Hoa Dinh
5a24ea0b42
Create headers symlinks for FBReactKit
...
Reviewed By: javache, skotchvail
Differential Revision: D3946452
fbshipit-source-id: c6354f529bec2f9635a0ecf5f65e21dc4e17b1e4
2016-09-30 14:28:41 -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
Pieter De Baets
4b70c66a27
Use glob in cxxreact BUCK rule
...
Reviewed By: lexs
Differential Revision: D3944546
fbshipit-source-id: 73cb3eeff3b3f5f543e69893f5071c4bd3e78be4
2016-09-30 09:28:47 -07:00
Michał Gregorczyk
b1fdac47b5
Wire compiled bundle API
...
Differential Revision: D3887878
fbshipit-source-id: 212fc3188f059d7378ecd61bb5e31fc87a857e8a
2016-09-29 09:13:39 -07:00
Michael Lee
fc154fcd74
Add `sign-compare` suppression for warning coming from `gtest.h`
...
Differential Revision: D3935414
fbshipit-source-id: 5f531cc65e74cae4cb23a0706b92dac0f3ef272d
2016-09-28 14:43:46 -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
6071e8ca2c
Support sync loading of the initial bundle/source
...
Reviewed By: javache
Differential Revision: D3897521
fbshipit-source-id: a4f234c7003a5f4be952d315eb62f382836e24dc
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
ff79224d37
Simplify ModuleConfig array format
...
Reviewed By: lexs, mhorowitz
Differential Revision: D3901563
fbshipit-source-id: 70aea19db1b01170be57b74ccfa1a306dfa1f362
2016-09-23 11:14:10 -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
Chris Hopman
77e533cb9f
Fix value.cpp tests and add tests for bad utf8/16
...
Reviewed By: mhorowitz
Differential Revision: D3699086
fbshipit-source-id: f8e4628a324602c786d6dfeb8f55736f9fc757cd
2016-09-12 16:43:36 -07:00
Chris Hopman
c507a05f70
Use c++1y for cxxreact
...
Reviewed By: mhorowitz
Differential Revision: D3852279
fbshipit-source-id: a7b80170d6b86428db47c15bbf02d68d293112fc
2016-09-12 16:43:36 -07:00
Pieter De Baets
99e0267c25
Cleanup and document native module configuration
...
Summary: Get rid of the old behaviour of JSON encoding in `nativeRequireModuleConfig` and consistently use the same names for function types "async/promise/sync"
Reviewed By: lexs
Differential Revision: D3819348
fbshipit-source-id: fc798a5abcaf6a3ef9d95bd8654afa7825c83967
2016-09-08 04:13:51 -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
Adam Ernst
708efcffba
Codemod away buck_flags in Libraries/FBR*
...
Reviewed By: ryu2
fbshipit-source-id: cc2d82a691b67aebfbb8ee8e40ba1ee4b49a0c44
2016-08-29 13:28:44 -07:00
Adam Ernst
2cd9939206
Even less deep copying of flags
...
Reviewed By: yiding
Differential Revision: D3760126
fbshipit-source-id: 590173773f65372c6aa4f4814a7d247ef23015d3
2016-08-29 10:13:48 -07:00
Chris Hopman
ccdc57dd96
Fix handling of bad utf16 passed out of JS
...
Summary:
JSC's utf16 -> utf8 conversion crashes on encountering bad utf16. Instead, use our own conversion (conveniently copied from fbjni).
Original fix thanks to rigdern (https://github.com/facebook/react-native/pull/9302 )
Reviewed By: mhorowitz
Differential Revision: D3746947
fbshipit-source-id: 29887ca720f6a2b074f01f853bad28a083b273bc
2016-08-23 17:13:38 -07:00
Kellie Medlin
2bd1f627ea
Test building with clang 3.9
...
Reviewed By: compnerd
Differential Revision: D3667327
fbshipit-source-id: f3ad04360068ee26aeec6f1c2dbe0ed96ba32ad0
2016-08-10 13:13:34 -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