Commit Graph

7499 Commits

Author SHA1 Message Date
Marc Horowitz e5ccdc4c2d add support for registering and calling sync methods in C++ modules
Differential Revision: D3574800

fbshipit-source-id: 4c238fd96c8f83e9424c8e2bf2c8ebb1d39d397a
2016-08-03 18:13:44 -07:00
Vojtech Novak a7ca90e7c7 running on device does not require apple dev program#2
Summary:
supersedes #9197
Closes https://github.com/facebook/react-native/pull/9198

Differential Revision: D3666896

Pulled By: hramos

fbshipit-source-id: 2177841dc1791545001a640992a01c83369fb9c8
2016-08-03 17:58:34 -07:00
ios122 5707c3d913 mediaPlaybackRequiresUserAction default value is true,not `false`
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/face
Closes https://github.com/facebook/react-native/pull/8999

Differential Revision: D3664512

Pulled By: javache

fbshipit-source-id: 030fe4752e53efcde21baadfc2502413b7fc9c8c
2016-08-03 17:43:49 -07:00
Héctor Ramos 01cb1e4ef6 Update Edit on GitHub links to point to master
Summary:
We've been getting a lot of documentation PRs opened against `0.29-stable`, `0.30-stable`, and so on, instead of `master`. This is because our doc site is also based on RN release cuts, so clicking on the "Edit on GitHub" links on a document will take you to the markdown source for that release branch instead of the latest doc on `master`.

See #9095 for an example of such a PR.

In this PR we edit the link to say View on GitHub. Though it may not prevent PRs from being opened against a release branch, removing the "Edit" CTA may help in this regard.
Closes https://github.com/facebook/react-native/pull/9149

Differential Revision: D3664368

Pulled By: vjeux

fbshipit-source-id: 395c0813f736bfbe1be4b4fb1182f9060169365d
2016-08-03 17:43:49 -07:00
Nam Se Hyun 9fa4fe2fa5 Stop Reload Android Webview On Same URL Before
Summary:
Because it is react, the url could be changed on redirection or some other ways.
The iOS version's WebView has controled that on [here](https://github.com/facebook/react-native/blob/master/React/Views/RCTWebView.m#L106).
But the Android's one is not.

Check the url is same with privous url. If it is true, cancel loading.
This logic is same with iOS's.

the ```method``` hasn't compared.

Test urls as we can.
The Google Map(https://map.google.com) was one of the site which has occur error before this commit.

related issue : #9121
Closes https://github.com/facebook/react-native/pull/9126

Differential Revision: D3663685

Pulled By: javache

fbshipit-source-id: f38c9012ee077677543dafcea83c0778a4471bfa
2016-08-03 17:43:49 -07:00
Brent Vatne 0093dcc9c5 Don't show keyboard shortcuts with redbox on device
Summary:
Unless there is some really fancy way to make pressing the keyboard shortcuts like cmd+r from your dev machine and have it reload on your device like you can in the simulator, we probably shouldn't display these when running on device.

![img_4679](https://cloud.githubusercontent.com/assets/90494/17316248/331d890a-5827-11e6-9796-0f2bf24315d7.PNG)

<img width="487" alt="screen shot 2016-08-01 at 8 29 41 pm" src="https://cloud.githubusercontent.com/assets/90494/17316250/3b174e5c-5827-11e6-8337-ac0c01843fae.png">

![img_4677](https://cloud.githubusercontent.com/assets/90494/17316257/47aebcd6-5827-11e6-8a16-b128275f73e8.JPG)
Closes https://github.com/facebook/react-native/pull/9154

Differential Revision: D3663618

Pulled By: javache

fbshipit-source-id: 22d85d65702fa8d99788b79d04136c36da0d5b66
2016-08-03 17:43:49 -07:00
Eliot Lash 66cfc76d20 Add note to networking docs about iOS ATS exceptions
Summary:
JoelMarcey requested that I make this PR based on [my comment](7ac931ee9b (commitcomment-18270206)).

I have signed the CLA.
However I was unable to verify that the site builds with this change. It looks okay in my markdown editor, but when following the contributor docs and running `npm install && npm start`, I get the following error when hitting node in my browser:

```
error in renderAPI for ../node_modules/react/lib/NativeMethodsMixin.js
Error: ENOENT: no such file or directory, open '../node_modules/react/lib/NativeMethodsMixin.js'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at renderAPI (/Users/eliot/Dev/react/react-native/website/server/extractDocs.js:439:28)
    at concat.apis.map (/Users/eliot/Dev/react/react-native/website/server/extractDocs.js:601:14)
    at Array.map (native)
    at module.exports (/Users/eliot/Dev/react/react-native/websit
Closes https://github.com/facebook/react-native/pull/9107

Differential Revision: D3664102

Pulled By: JoelMarcey

fbshipit-source-id: 845917351ba9d3d2f5351a8f926757718c806025
2016-08-03 16:58:35 -07:00
Marc Horowitz da2684f0e7 Refactor CxxNativeModule out of android-specific code into common code
Differential Revision: D3574789

fbshipit-source-id: 0cb5965d20dcf7accb6a94514486b8fda1126b7b
2016-08-03 16:01:24 -07:00
ExplodingCabbage baf207e724 Fix misleading docstring on getInitialNotification
Summary:
The docs heavily implied that this method returned a notification object or null directly, like popInitialNotification used to do. In fact, it returns a promise. This change clarifies this.

Note that:
- This is purely a comment change, so no testing required.
- I've adhered to the 80 character line limit, and can't think of any other style rules you might have that could apply here.
Closes https://github.com/facebook/react-native/pull/9052

Differential Revision: D3662807

Pulled By: javache

fbshipit-source-id: 7a2573e03d7704b2d62a3499d350506ae73e8d77
2016-08-03 12:28:41 -07:00
Vojtech Novak 2fe5573492 add debugging native code
Summary:
I believe it is beneficial to explicitly state that this is possible.
Closes https://github.com/facebook/react-native/pull/8543

Differential Revision: D3663264

Pulled By: hramos

fbshipit-source-id: cb95e31d8c1d2d38929dac3e3bfda26aa6054a11
2016-08-03 11:28:59 -07:00
Seph Soliman 0fdbfb029e Return statement missing for renderScene
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Example code for "Using Navigators" under "THE BASICS" does not work. renderScene needs to return the components, not just instantiate them.

**Test plan (required)**

I copy-paste and ran the code but did not get anything rendered. I added a return statement before the component which made it work.

Arrow functions need a return statement when supplying a { block of code }.
Closes https://github.com/facebook/react-native/pull/9161

Differential Revision: D3663200

Pulled By: hramos

fbshipit-source-id: a8732dd1098de7c8ea915f459adb3403a8168f19
2016-08-03 11:28:59 -07:00
Slavik Manukyan 54d8f221c2 Way to pass styles to nested view
Summary:
Ability to pass styles to nested view for _position_ behavior.

Use case:

``` jsx
<KeyboardAvoidingView
          behavior={'position'}
          style={{ flex: 1 }}
          contentContainerStyle={{ flex: 1 }}
          keyboardVerticalOffset={ - VERTICAL_OFFSET }
>
          <SomeContainer   />
</KeyboardAvoidingView>
```
Closes https://github.com/facebook/react-native/pull/9065

Differential Revision: D3662876

Pulled By: javache

fbshipit-source-id: 9b08a04449431c4e563ef4464b5a7dba1fc02e4b
2016-08-03 11:28:58 -07:00
Mike Grabowski 504b516947 Fix corrupted `options()` call for link and other commands
Summary:
The issue here is that sometimes `this.options()` is not `[options]` but contains different stuff, esp. if your command accepts arguments.

This commit reverts its original behaviour and passes custom `examples` property that we use instead.

Tested, can be shipped right away.

Differential Revision: D3662179

fbshipit-source-id: 4b2af3487464d46e2007388230e675ce3575f797
2016-08-03 08:32:18 -07:00
Konstantin Raev 8419faa365 Fixed test CRMNowThumbnailCache-test.js
Reviewed By: matryoshcow

Differential Revision: D3662150

fbshipit-source-id: 29cb7ee52ba8dc67ecf2214ff92b2f97711debf0
2016-08-03 06:13:29 -07:00
Konstantin Raev 1f603ffca9 Fixed version of jest to 14.1.0
Reviewed By: cpojer

Differential Revision: D3655343

fbshipit-source-id: 5987b0e3f247c68f9d6b70de39992da4dc0df4ed
2016-08-03 05:28:29 -07:00
R0CKSTAR 916bc38d89 Fix libraries missing in examples: 2048 and TicTacToe
Summary:
The examples: 2048 and TicTacToe will display errors when click the run on Xcode. I imported RCTNetwork and RCTImage for 2048 and RCTNetwork for TicTacToe and it works on the simulator.
Closes https://github.com/facebook/react-native/pull/9123

Differential Revision: D3662099

Pulled By: javache

fbshipit-source-id: 2e2d88336ea83eae58088f4cc1d5003ba2a2f71b
2016-08-03 04:58:28 -07:00
alvaromb e52cab5a7f Adds the ability to use UIManager to check if a node is an ancestor
Summary:
Sometimes is handy to check if a React node is a descendant of another node or not. For instance, I want to check if the focused `TextInput` is descendant of an specific `ScrollView`:

```js
const currentlyFocusedField = TextInput.State.currentlyFocusedField()
UIManager.viewIsAncestorOf(
  currentlyFocusedField,
  this.getInnerViewNode(),
  (isAncestor) => {
    if (isAncestor) {
      console.log('The focused field is a descendant of this ScrollView!')
    }
  }
)
```

This function uses the same strategy as the `measureLayout` method to check if one node is an ancestor of other node. As the `measureLayout` method, this is performed outside the main thread.

By now I've only implemented the iOS version and its tests, but if this function is going to be merged I'll implement the Android version too. I have objc experience but no Java or Android, so I prefer to validate this functionality before jumping into developing the Android part.
Closes https://github.com/facebook/react-native/pull/7876

Differential Revision: D3662045

Pulled By: javache

fbshipit-source-id: b9668e8ea94fd01db76651f16243926cf9c2566f
2016-08-03 04:13:43 -07:00
Kureev Alexey 59a1311c86 Feature/watch symlinks
Summary:
see #9009

cc bestander
Closes https://github.com/facebook/react-native/pull/9176

Differential Revision: D3662018

Pulled By: bestander

fbshipit-source-id: a4c03e69e5215377b1edac940f0254a0fd429258
2016-08-03 03:44:57 -07:00
Emil Sjolander f80b93afd3 Dont redefine abort() as it may leak into other files
Differential Revision: D3661871

fbshipit-source-id: 14a9d076299b4f21d17a2bed68aa30b796c438a5
2016-08-03 01:58:39 -07:00
Mike Grabowski 4fce8ea4f4 Fixes #9168
Summary:
Imports missing commit from the rnpm master.
Closes https://github.com/facebook/react-native/pull/9179

Differential Revision: D3661909

fbshipit-source-id: 23ebd3b96f236ab140f91eb4ed9f456d7c925027
2016-08-03 01:58:38 -07:00
Tom Hayden cb778aa543 reset-cache flag no longer needs boolean
Summary:
When compiling 0.31-rc1 was having issues with xcode running the package script and failing (ie not running and returning the --help info) Was due to this - simply changing the flag to --reset-cache instead of --reset-cache true worked miracles.

**Test plan (required)**

Ran packager without and runs but doesn't build the package, runs with small change and works now. Can copy paste output if you want but it's pretty super verbose for this small change.
Closes https://github.com/facebook/react-native/pull/9177

Differential Revision: D3661831

fbshipit-source-id: 3cebc543806b8fe3e413f83c59c9fb74e5e078f4
2016-08-03 01:13:37 -07:00
Eric Rozell 4ce431b9cf Fixes command validity check for local-cli.
Summary:
Prior to the RNPM integration, command names would match the second argument passed to the react-native-cli. Now the command names contain some usage information (such as non-flag CLI arguments). This commit splits the name of the commands and checks that against the second command line argument.
Closes https://github.com/facebook/react-native/pull/9171

Differential Revision: D3661799

fbshipit-source-id: dc2aa9cd9e69dde3c5b877aeb77a17c4f6427075
2016-08-03 00:58:34 -07:00
Eric Rozell de517a84e8 Flattens RNPM user commands from plugin modules
Summary:
RNPM plugins may have ship multiple commands as extensions (e.g., https://github.com/rnpm/rnpm-plugin-link/blob/master/index.js#L1)

The consumer of the user commands (https://github.com/facebook/react-native/blob/master/local-cli/commands.js#L67) expects a flat list of commands, which used to be flattened here https://github.com/rnpm/rnpm/blob/master/bin/cli#L35 in RNPM.

This commit simply flattens the (possible) set of commands coming out of a user plugin.
Closes https://github.com/facebook/react-native/pull/9170

Differential Revision: D3661809

fbshipit-source-id: 72107745e53bf63b47a297eae546ed4a69c57008
2016-08-03 00:58:33 -07:00
Gabe Levi e34dd4f938 Deploy v0.30.0
Reviewed By: avikchaudhuri

Differential Revision: D3654213

fbshipit-source-id: b03879345ad9beae73a055c1b2e7211d074a08f0
2016-08-02 20:58:28 -07:00
Daniel Schmidt c2cf510ff8 Improve the BackAndroid example to be more clear
Summary:
The example of `BackAndroid` caused a bit of confusion for beginners (see #8822), so I thought we should clarify the functionality a bit. I added a comment indicating that a user would have to implement `this.onMainScreen` and `this.goBack` on their own, this was the original problem.
Closes https://github.com/facebook/react-native/pull/8829

Differential Revision: D3660332

fbshipit-source-id: d84a29586c6a1a439f386e6b88220d7b0a275129
2016-08-02 18:30:38 -07:00
Chris Hopman 1a690d5674 Delete old bridge
Reviewed By: astreet

Differential Revision: D3510660

fbshipit-source-id: 031b9dcf19dd4e6677a6c9417917930bcbbe3219
2016-08-02 17:58:26 -07:00
Artyom Trityak 5617d41327 ActivityIndicator Example ES6 classes migration and TimerMixin removal
Summary:
**This is the first part of `React.createClass` -> ES2015 classes migration.
1. Rewritten UI Explorer ActivityIndicator example to ES2015 classes
2. Removed TimerMixin from example.

Motivation:

- ES2015 classes do not support mixins so due to the classes / pure functions as "best practices" it would be better to avoid mixins in examples.

- TimerMixin is covered later and is out of scope of current example.
Closes https://github.com/facebook/react-native/pull/8342

Differential Revision: D3659349

fbshipit-source-id: e1c6f1a3091d60c589303fe6da55b8d132adedc3
2016-08-02 17:13:30 -07:00
Daniel Braun b21c8f1614 --reset-cache no longer accept a boolean parameter.
Summary:
The gradle :app:bundleReleaseJsAndAssets task is currently broken on master.
Gradle attaches a boolean parameter to --reset-cache, while it no longer accepts it.

Related:
* https://github.com/facebook/react-native/blob/master/local-cli/bundle/bundleCommandLineArgs.js#L52
* #9134
* https://github.com/facebook/react-native/blob/master/local-cli/bundle/bundleCommandLineArgs.js#L52
Closes https://github.com/facebook/react-native/pull/9163

Differential Revision: D3659300

fbshipit-source-id: 798f211407ee279e9adc98948e94b212da84555a
2016-08-02 16:47:56 -07:00
Alex Leventer e99c001d58 Add TRED.com to the showcase page
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/face
Closes https://github.com/facebook/react-native/pull/9175

Differential Revision: D3658765

Pulled By: hramos

fbshipit-source-id: bc8a37fdd6393a2107b33c9fd1b8620cb5a7c07c
2016-08-02 16:47:56 -07:00
Ryan Gomba eb96b7fabc Maintain transform order
Summary:
This diff addresses the issues raised by kmagiera in https://github.com/facebook/react-native/pull/7884. Transforms should be applied in the order they are defined, just like in `processTransform.js`. A scale applied before a translation, for instance, should give a different result than a translation applied before a scale.

We leverage CATransform3D to do the heavy lifting. A concatenated transform is passed all the way to `RCTViewPropertyMapper`. It is compared with the transform currently applied to the view, and if different, applied. The same approach is used for opacity.

I think it makes the most sense to do this diffing in `RCTViewPropertyMapper`, as opposed to creating and cleaning up an `_updatedPropsDictionary` each frame in `RCTTransformAnimatedNode` and `RCTStyleAnimatedNode`. The node should keep its full value; applying a minimal set of altered props is an optimization.  The higher up this optimization is implemented, the more assumptions it makes. e.g. that there will only ever be a sing
Closes https://github.com/facebook/react-native/pull/9050

Differential Revision: D3658139

fbshipit-source-id: ad6286762ef734084cbdf83c9bd9241190302d34
2016-08-02 14:28:29 -07:00
Pieter De Baets b83ccb5749 Reverted commit D3580025
Reviewed By: mhorowitz

Differential Revision: D3580025

fbshipit-source-id: 4422b6b97ef844158e369e022d62d6f0ae641222
2016-08-02 14:13:27 -07:00
Konstantin Raev ed89d5ba0d fixed trunk: wrong way to require a module
Summary:
This should fix https://travis-ci.org/facebook/react-native/jobs/149264391
Closes https://github.com/facebook/react-native/pull/9169

Differential Revision: D3657544

Pulled By: javache

fbshipit-source-id: d49ed0355cc5da72d1d8f40dfa03e669f2291db1
2016-08-02 13:13:26 -07:00
Daniel Braun c15e2bb619 Fixed reverse logic in ReactToolbarManager setRtl.
Summary:
The logic in `setRtl` is wrong. You would expect that `{rtl: true}` would set the layout direction to RTL, instead it currently does the opposite.
This commit fixes the issue.
Closes https://github.com/facebook/react-native/pull/9132

Differential Revision: D3657134

fbshipit-source-id: f946698b548988541de7da5565d2ab122746ecf0
2016-08-02 12:28:33 -07:00
Lukas Piatkowski 350b5a2c48 Use packager's source map to resolve function name and clean up dead code in SP
Reviewed By: bnham

Differential Revision: D3649501

fbshipit-source-id: 62e13633436c645d9b43eb75c39b4ddcf0458eb3
2016-08-02 11:14:06 -07:00
Lukas Piatkowski 066de9d820 #18 Using the bundle url resolve origin source in jsc profiler middleware
Reviewed By: bestander

Differential Revision: D3620292

fbshipit-source-id: e3c54fb30bc65ff1ddd650340a2905a9f0e16231
2016-08-02 11:14:06 -07:00
Lukas Piatkowski 2231b21ed0 #15.1 Extend packager server to receive signals from Sampling Profiler
Reviewed By: bestander

Differential Revision: D3606098

fbshipit-source-id: ec55030dd1b3a27f0595650da1ce01fe1ac9116c
2016-08-02 11:14:06 -07:00
Lukas Piatkowski ec0ccf599a #15 Add a button in devtools to start/stop the Sampling Profiler
Differential Revision: D3555704

fbshipit-source-id: 4add16c923fcfd306892efec4630c24ae438d6dd
2016-08-02 11:14:06 -07:00
Pieter De Baets e762d961cd Use new enqueueJSCall method everywhere
Reviewed By: majak

Differential Revision: D3605263

fbshipit-source-id: 215f896d675b937593c8b796ed6ec5261ac74dbf
2016-08-02 11:14:06 -07:00
androidtrunkagent 1ab4b2a792 Add support for passing in additional assetExts to packager
fbshipit-source-id: 42e508e37d960fbeb905a2ea8cb4741dba5c67fc
2016-08-02 10:27:25 -07:00
Pieter De Baets 47d6d289d4 Customize main thread initialization of native modules
Reviewed By: mhorowitz

Differential Revision: D3580025

fbshipit-source-id: 18abc15b894c745f584d91da47035c6db036aafa
2016-08-02 10:27:25 -07:00
xujinyang 6ae348e8de Feature/add show case
Summary:
so we back , this time we udpate info about our app.

introduce:
https://elelogistics.github.io/about/Hummingbird-Crowdsource.html

Crowdsource App Write In React Native
https://elelogistics.github.io/about/Crowdsource-App-Write-In-React-Native.html

hope we can in show case

thanks all
Closes https://github.com/facebook/react-native/pull/9158

Differential Revision: D3655934

Pulled By: lacker

fbshipit-source-id: 66f9450912140e6b07761088cd0106e121e91da8
2016-08-02 09:58:32 -07:00
Konstantin Raev 55300382c6 disable symink finder to fix tests
Summary:
cc Kureev

Disabling symlink resolver temporarily because it breaks launchPackager.command.
Waiting for a PR with a fix to enable both
Closes https://github.com/facebook/react-native/pull/9166

Differential Revision: D3655846

Pulled By: matryoshcow

fbshipit-source-id: da0bfc64f5fd9d747db2b97d669fcb98250faf39
2016-08-02 09:43:33 -07:00
Siqi Liu 43f73f675f Enable websocket interception in RN network inspector tool
Summary:
This diff enables network inspection for WebSocket APIs, so by now XMLHttpRequest, Fetch and WebSocket are all supported. Android and iOS are both supported.

This diff monkey-patches the RCTWebSocketModule which WebSocket API builds on, and now it is able to intercept all WebSocket requests when app is running. The intercepted information of a WebSocket includes url, protocols, status, messages (sent and received), close reason, server close event and server error information, etc.

Reviewed By: davidaurelio

Differential Revision: D3641770

fbshipit-source-id: 393df0da74ed95b1fd60e38b0d67ed61b3dd5ff3
2016-08-02 08:28:39 -07:00
Siqi Liu 1e8b83d2e6 Add unique ids to the intercepted XHR objects to make the tracking correctly across inspector restarts.
Summary: In previous `XHRInterceptor`, it sometimes crashes when restarting the network inspector because the id of the XHR objects are not unique all time. Fix this in diff by adding a global id "generator" for all intercepted xhr objects in order to make it safe across inspector restarts.

Reviewed By: davidaurelio

Differential Revision: D3641624

fbshipit-source-id: f9a1589f278023243aa182d3da93ce69c985587c
2016-08-02 08:28:39 -07:00
Emil Sjolander f94e4348dd Implement custom assert macro
Reviewed By: javache

Differential Revision: D3648805

fbshipit-source-id: a6bf1bb55e1e0ee37284647ab76d66f3956a66c0
2016-08-02 08:13:58 -07:00
Emil Sjolander 2d168fcd61 use #pragma once
Reviewed By: lucasr

Differential Revision: D3648895

fbshipit-source-id: faf42cda82764adaf41cf3f3f9109d48aea203fe
2016-08-02 08:13:58 -07:00
Emil Sjolander ef585e33b1 Make use of modern standard types
Reviewed By: lucasr

Differential Revision: D3649096

fbshipit-source-id: dc9fc8861c3106494c5d00d6ac337da50a4c945b
2016-08-02 08:13:57 -07:00
Charles Dick aba87550cc upload JSC heap capture to bundle server
Reviewed By: bestander

Differential Revision: D3642116

fbshipit-source-id: 9626078bb0f087f55d8270c8e0b082c74bd2df9d
2016-08-02 08:13:57 -07:00
Pieter De Baets 73f3713cd0 Improve error message when packager is not running
Reviewed By: majak

Differential Revision: D3655608

fbshipit-source-id: 49401a03beb986285d288bb80ba78052a26326ef
2016-08-02 08:13:57 -07:00
danieldunderfelt 591217ea7d Make onUnhandled safe for undefined errors
Summary:
This pull request fixes cases where the `error` argument of the `onUnhandled` method in `Libraries/Promise.js` is undefined. Previously this would result in a redbox with the helpful message: `Cannot read property message of undefined`. With this pull request, unhandled promise rejections result in the desired yellowbox saying that a promise rejection went unhandled.

I still do not know what would cause the error argument to be undefined, but this change makes the module behave as expected in an app I am building.

cc bestander

Relevant issue: #8452
Closes https://github.com/facebook/react-native/pull/9119

Differential Revision: D3655589

Pulled By: bestander

fbshipit-source-id: a975a0ab58701240ba06574c04521cd542700ff7
2016-08-02 07:58:28 -07:00