Commit Graph

4482 Commits

Author SHA1 Message Date
Tadeu Zagallo b6fce4ad52 Prevent the profiler from hooking into stret methods
Summary:
public

In order to handle methods that returns struct in i386 and x86_64 we'd need to implement special methods (like objc_msgSend_stret),
but we'll just bail out for now, since there's very few usages.

Reviewed By: jspahrsummers

Differential Revision: D2754732

fb-gh-sync-id: d3585d244633d918770ef79a52dee9cdf87a53da
2015-12-14 07:12:32 -08:00
Brent Vatne c8108bdbe1 Fixed controlled component on iOS and remove unnecessary code
Summary:
Closes #4290

`mostRecentEventCount` was always being set after `text` on iOS, so let's be really explicit about the order here as we were doing on Android: always call `setNativeProps` providing the `mostRecentEventCount` before we call `onChange` or `onChangeText`.

I also ripped out storing `mostRecentEventCount` in the state, which isn't necessary since we're always doing it through `setNativeProps`.
Closes https://github.com/facebook/react-native/pull/4588

Reviewed By: svcscm

Differential Revision: D2754565

Pulled By: nicklockwood

fb-gh-sync-id: a1401f39b4e19248095517c2a3503cd2af59fa47
2015-12-14 06:46:31 -08:00
Krzysztof Magiera 2f56c0c90a Upgrade gradle to 2.9
Summary:
public

New version of gradle has a better support for zipTree copy task. Since we have a few of those including one for boost library which used to take very long, after upgrading we no longer need 6a656a1.

Also seems like many improvements made to gradle since 2.2 made it perform better on incremental builds (around 10% improvement on my laptop).

Command used to upgrade gradle version:

    gradle wrapper --gradle-version 2.9

Some of the plugins require updating as well since the previous versions were incompatible with gradle 2.9.

Closes https://github.com/facebook/react-native/pull/4462

Reviewed By: mkonicek

Differential Revision: D2754786

Pulled By: mkonicek

fb-gh-sync-id: 92c07d29aec6d5b4b2c55205b42b135c4d9479a9
2015-12-14 06:37:34 -08:00
Martin Konicek 1d71457934 Update AndroidBuildingFromSource.md 2015-12-14 14:32:25 +00:00
Martin Konicek 73e9bc27d4 Merge pull request #4745 from aknuds1/typo
Fix message when react-native init encounters existing directory.
2015-12-14 13:39:25 +00:00
Martin Konicek b33e091765 Update Releases.md 2015-12-14 12:55:09 +00:00
Satyajit Sahoo c6dbff6ae5 Merge pull request #4769 from jondot/master
Adding Due to showcase (Apps)
2015-12-14 17:49:13 +05:30
Dotan Nahum ff58629640 Alphabetical ordering 2015-12-14 14:13:58 +02:00
Dotan Nahum b8f3730d8d Adding Due to showcase (Apps) 2015-12-14 13:22:21 +02:00
sunnylqm a1077ba6e9 remove the undocumented @provideModules
Using relative file path
2015-12-14 15:10:00 +08:00
Huang Yu 4373aa6822 fix animated lint warnings
Summary:
fix lint warnings under 'Libraries/Animated' directory
Closes https://github.com/facebook/react-native/pull/4448

Reviewed By: svcscm

Differential Revision: D2753880

Pulled By: androidtrunkagent

fb-gh-sync-id: c6619c636ff67a74e6f063f70526327d756271db
2015-12-13 11:45:28 -08:00
Satyajit Sahoo 90be04610c Merge pull request #2973 from corbt/fix_docs
change native-modules link to work on gh-pages
2015-12-14 00:35:42 +05:30
Martin Konicek 1280df0464 Update Releases.md 2015-12-13 14:34:57 +00:00
Martin Konicek 2f30acb5bc Update Releases.md 2015-12-13 14:33:52 +00:00
Martin Konicek 476b0af510 Update NewIssueGreeting.md 2015-12-13 14:14:09 +00:00
Martin Konicek a5c0fd3272 Update Releases.md 2015-12-13 12:06:43 +00:00
Martin Konicek 9cf2edb458 Update Releases.md 2015-12-13 11:57:28 +00:00
James Ide a70be679f6 Merge pull request #4752 from sunnylqm/patch-12
update the way of using module Dimensions
2015-12-13 01:35:35 -08:00
sunnylqm 331fb61376 update the way of using module Dimensions 2015-12-13 17:29:18 +08:00
James Ide de677205ec [Website] Add PullToRefreshViewAndroid to the web docs 2015-12-12 20:30:39 -08:00
WanderWang 2c7409b9ee improve exception message when we can't find a file
Summary:
in ```fastfs.js ``` when ```getFile()``` got a exception it will print ``` Unable to find file with path: null ``` in terminal .

It's  confused
Closes https://github.com/facebook/react-native/pull/4737

Reviewed By: svcscm

Differential Revision: D2752888

Pulled By: androidtrunkagent

fb-gh-sync-id: a366da1eea27c691248dcb17019f4462a639ea70
2015-12-12 17:28:33 -08:00
Alexander Blom 01e291751a Use callOnQueue() instead of latch
Reviewed By: astreet

Differential Revision: D2717989

fb-gh-sync-id: 9770e773015838301f6e9520a1ca7a283f647de7
2015-12-12 14:33:17 -08:00
Alexander Blom 8de172e92d Refactor so that mBridge can not be null and can be final
Reviewed By: astreet

Differential Revision: D2717983

fb-gh-sync-id: 969499eb062d54e0271f910c06c4539e2cb20030
2015-12-12 14:33:12 -08:00
Christopher Chedeau f2d84456e5 Merge pull request #4687 from vjeux/code_analysis_bot
Code Analysis Bot
2015-12-12 13:56:15 -08:00
Billy Lamberta d290723845 Add the npm global prefix to PATH.
Summary:
Related to issue https://github.com/facebook/react-native/issues/4034#issuecomment-164134543.
The npm global install path may be set to a non-standard location. `react-native` is assumed to be in `PATH` but doesn't take into account the user's environment so building in Xcode fails:
~~~
react-native bundle --entry-file index.ios.js --platform ios --dev true --bundle-output [...]

../node_modules/react-native/packager/react-native-xcode.sh: line 48: react-native: command not found
Command /bin/sh failed with exit code 127
~~~
This fix uses `npm prefix -g` to get the bin location and adds it to `PATH`.
Closes https://github.com/facebook/react-native/pull/4749

Reviewed By: svcscm

Differential Revision: D2753215

Pulled By: androidtrunkagent

fb-gh-sync-id: 964d1a71ac1bf204545a594a9fa433a7bc367f35
2015-12-12 13:08:31 -08:00
Qiao Liang c60b581327 fix POST/PUT/PATCH has no body redbox, when xhr is used without body
Summary:
… by passing a empty body
fix #3371
referring to https://github.com/square/okhttp/pull/1559/files
Closes https://github.com/facebook/react-native/pull/4518

Reviewed By: svcscm

Differential Revision: D2753086

Pulled By: lexs

fb-gh-sync-id: 5c486b127b194b29cd0f8a2cb9a1ef19449109e3
2015-12-12 09:11:30 -08:00
Arve Knudsen 70b695922e Fix typo 2015-12-12 13:10:36 +01:00
James Ide c2b38c9113 Merge pull request #4744 from zjlovezj/patch-2
fix sample code error by removing the extra chars
2015-12-12 04:06:06 -08:00
zjlovezj e6c8848c07 fix sample code error by removing the extra chars
fix sample code error by removing the extra ',' and ')'
2015-12-12 19:21:31 +08:00
James Ide 23e0945c93 Merge pull request #4742 from aljs/patch-1
Add 'Thai Tone' to showcase
2015-12-12 02:39:29 -08:00
Alex Ledak 0ad6f5ebf1 Add 'Thai Tone' to showcase 2015-12-12 17:10:43 +07:00
Huang Yu e0c724a4c3 fix lint warnings from DrawerLayoutAndroid
Summary:
fix 3 lint warnings from DrawerLayoutAndroid.android.js
Closes https://github.com/facebook/react-native/pull/4451

Reviewed By: svcscm

Differential Revision: D2715067

Pulled By: mkonicek

fb-gh-sync-id: 9cd0158087c8533950cdab85fdbfb137fcca20e4
2015-12-11 23:05:27 -08:00
Christopher Dro e4fe557089 Fix all warnings for missing keys.
Summary:
I had to go through each component while debugging for another issue and decided to clean these warnings up along the way.
Closes https://github.com/facebook/react-native/pull/4653

Reviewed By: svcscm

Differential Revision: D2752740

Pulled By: androidtrunkagent

fb-gh-sync-id: 94da8ad693cae04e353f33f540c15214f6f3e7d8
2015-12-11 21:23:29 -08:00
Mark Oswald bd3cb3ae1d add quotes to handle pathnames with spaces in it
Summary:
fixes #3135
Closes https://github.com/facebook/react-native/pull/4369

Reviewed By: svcscm

Differential Revision: D2752708

Pulled By: androidtrunkagent

fb-gh-sync-id: ada11eecb6bd5b8519e30636d18aa6b8962198aa
2015-12-11 20:33:28 -08:00
Sebastian Markbage 2696f9440e enqueueJSCall instead of global dynamic require
Summary:
BridgeProfiling.setEnabled used a one off eval. Let's use the bridge to do this like everything else. This is already what the Android equivalent is doing.

public

Reviewed By: tadeuzagallo

Differential Revision: D2745059

fb-gh-sync-id: 5b633365b8cfc8abc6b80255e82ef3053ead9b50
2015-12-11 16:41:33 -08:00
Jan Kassens 836ba8fb38 BridgeProfiler: add sync Relay methods
Reviewed By: sahrens

Differential Revision: D2721549

fb-gh-sync-id: af6a83f8505a83e323af3992d9552654ea644324
2015-12-11 11:50:30 -08:00
Martin Konicek f168fc335e Don't insta-crash when network permission is missing
Summary:
public

Rename the `ConnectivityModule` to `NetInfoModule` (there's
no need to name things differently in two places). Add exception
handling to the module in case the network permission is missing.

When the permission is missing, throw an actionable error from
all calls to `NetInfo`: http://imgur.com/zVIMxOV

Without this change, the app immediately crashes on startup:
`getCurrentConnectionType` is called from `Activity.onResume`.

Reviewed By: andreicoman11, bestander

Differential Revision: D2749230

fb-gh-sync-id: 1b752d21a8f28ffeaf60a3322cb76f869dc70a14
2015-12-11 10:29:23 -08:00
Christopher Chedeau 402fd06725 Introduce code-analysis bot 2015-12-11 08:44:12 -08:00
Satyajit Sahoo 4b800e6ce1 Merge pull request #4732 from sharathprabhal/patch-1
Add 'Eat or Not' to showcase
2015-12-11 21:58:41 +05:30
Martin Konicek 339c114b96 Update Releases.md 2015-12-11 16:15:14 +00:00
Martin Konicek 9443a4e65f Update Releases.md 2015-12-11 16:14:31 +00:00
Martin Konicek eb3152a397 Update Releases.md 2015-12-11 15:44:13 +00:00
Mike Armstrong 1a94698658 expose systemclock time to JS
Reviewed By: tadeuzagallo

Differential Revision: D2748749

fb-gh-sync-id: 4d1dbae61f69a07b7106cb57caff03cadfb85776
2015-12-11 07:32:30 -08:00
Sharath Prabhal 7003f8dbeb Add 'Eat or Not' to showcase 2015-12-11 10:09:31 -05:00
Martin Kralik a86171a482 exposed a way to trigger layout on the uimanager
Summary:
A component can be backed by native "node" that can change its internal state, which would result in a new UI after the next layout. Since js has no way of knowing that this has happened it wouldn't trigger a layout if nothing in js world has changed. Therefore we need a way how to trigger layout from native code.

This diff does it by adding methods `layoutIfNeeded` on the uimanager and `isBatchActive` on the bridge.
When `layoutIfNeeded` is called it checks whether a batch is in progress. If it is we do nothing, since at it's end layout happens. If a batch is not in progress we immidiately do layout.

I went with the easiest way how to implement this - `isBatchActive` is a public method on the bridge. It's not ideal, but consistent with other methods for modules.
public

Reviewed By: jspahrsummers, nicklockwood

Differential Revision: D2748896

fb-gh-sync-id: f3664c4af980d40a463b538e069b26c9ebad6300
2015-12-11 06:59:30 -08:00
Adam Miskiewicz 302317c250 Merge pull request #4731 from tp/testing-typo
Fix typo in Testing.md
2015-12-11 09:41:11 -05:00
Timm Preetz 73daa9595b Fix typo in Testing.md 2015-12-11 15:22:57 +01:00
Tadeu Zagallo 3549ff049c Rename BridgeProfiling to Systrace for consistency
Summary:
public

Rename the `BridgeProfiling` JS module to `Systrace`, since it's actually just
an API to Systrace markers.

This should make it clearer as we add more perf tooling.

Reviewed By: jspahrsummers

Differential Revision: D2734001

fb-gh-sync-id: 642848fa7340c545067f2a7cf5cef8af1c8a69a2
2015-12-11 03:53:19 -08:00
Justin Spahr-Summers 44cbec28bd Work around race condition in bridge deallocation
Reviewed By: tadeuzagallo, nicklockwood

Differential Revision: D2748820

fb-gh-sync-id: 40084ab4bcc606ccbde8b71c2389e602c4dd8e22
2015-12-11 01:45:29 -08:00
Sebastian Markbage ae912a83d7 Codemod Internal Unit Tests and Remove Require Fallback
Summary:
MessageQueue no longer falls back to require. To do this we need to register all the modules in our internal unit tests. I did this codemod manually.

This is a bit unfortunate boilerplate but there are very few of these modules outside of unit tests. This boilerplate is only a hassle for these test files.

public

Reviewed By: spicyj

Differential Revision: D2736397

fb-gh-sync-id: 59fa4c4e75c538f3577bc9693b93e1b7c4d4d233
2015-12-10 23:24:29 -08:00