Commit Graph

15 Commits

Author SHA1 Message Date
Alex Kotliarskyi f3fab5184e Remove SourceCode.getScriptText
Summary:
After cleaning up JS SourceMap code, these native methods are not needed anymore.

On iOS it saves another 30+ Mb during development.

Reviewed By: javache, astreet

Differential Revision: D3348975

fbshipit-source-id: a68ae9b00b4dbaa374b421029ae676fc69ae5a75
2016-06-07 11:13:32 -07:00
Pieter De Baets 8b1726bdad Improve error handling in require-unbundle
Reviewed By: davidaurelio

Differential Revision: D3207450

fb-gh-sync-id: 35247c265e35976dcee9fca4215403efa604479e
fbshipit-source-id: 35247c265e35976dcee9fca4215403efa604479e
2016-04-22 06:18:26 -07:00
Dave Miller c9a1956c4f Fix promises on iOS to no longer wrap values in Arrays
Summary:
public
In 9baff8f437 (diff-8d9841e5b53fd6c9cf3a7f431827e319R331), I incorrectly assumed that iOS was wrapping promises in an extra Array.  What was really happening is that all the callers were doing this.  I removed the wrapping in the callers and the special case handling MessageQueue.

Now one can pass whatever object one wants to resolve and it will show properly in the resolve call on the js side.  This fixes issue https://github.com/facebook/react-native/issues/5851

Reviewed By: nicklockwood

Differential Revision: D2921565

fb-gh-sync-id: 9f81e2a87f6a48e9197413b843e452db345a7ff9
shipit-source-id: 9f81e2a87f6a48e9197413b843e452db345a7ff9
2016-02-10 07:25:35 -08:00
Satyajit Sahoo 0007bff977 Use promises in 'SourceCodeModule'
Summary: Closes https://github.com/facebook/react-native/pull/5504

Reviewed By: svcscm

Differential Revision: D2861158

Pulled By: dmmiller

fb-gh-sync-id: 3e9c257288539183f6156b8d360b54dc570bc7ad
2016-01-25 12:34:31 -08:00
Nick Lockwood fa0b45c58b Replaced RCTSparseArray with NSDictionary
Reviewed By: jspahrsummers

Differential Revision: D2651920

fb-gh-sync-id: 953e2ea33abfc7a3a553da95b13e9ab2bccc5a1c
2015-11-14 10:28:28 -08:00
Frédéric Sagnes 4a3857ef1d Use JSStringCreateWithUTF8CString and skip NSString decoding when loading the bundle
Summary: public

Benchmarking our startup path has shown we spend a lot of time decoding strings (iPhone 4S / iPhone 5):

* reading a 2MB JS bundle: 35ms / 15ms
* decoding is to an `NSString`: 186ms / 78ms
* transforming that to a `JSString`: 29ms / 10ms

Instead of going through an `NSString` transformation, we generate a null-terminated bundle (0.1ms / 0.05ms to copy the data) and use `JSStringCreateWithUTF8CString` (121ms / 53ms) to generate the string. That makes decoding 70% faster.

Reviewed By: javache

Differential Revision: D2541140

fb-gh-sync-id: 09a016b8edfd46a9b62682c76705564d2024e75e
2015-10-16 08:11:25 -07:00
Alex Kotliarskyi c069035479 [React Native] Bring back .sourceURL 2015-09-02 14:12:48 -08:00
Pieter De Baets e15f584a3d Slim RCTSourceCode in production 2015-08-28 05:46:35 -08:00
Nick Lockwood 88e0bbc469 Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
Alex Akers a65bbe14d3 [React Native] Update additional callsites with RCTResponseErrorBlock 2015-07-14 03:59:18 -08:00
Alex Kotliarskyi 2434512847 [ReactNative] Allow JS know its URL 2015-04-20 14:20:36 -08:00
Nick Lockwood ead0f2e020 Implemented thread control for exported methods 2015-04-18 11:13:39 -08:00
Alex Akers 8a57c4e980 [React Native] RCT_EXPORT lvl.2 2015-04-08 08:34:10 -08:00
Nick Lockwood bf4868edda Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Tadeu Zagallo 20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00