mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 23:55:23 +00:00
send fatal error for js exception in eventEmitter
Summary: public Any uncaught exception inside an event emitter handler was reported as softError, which didn't crash the app, but left the app running in an unknown state. Since there's no way for the app to catch these softerror (to provide a fallback error view, etc), let's change it to report fatal error for uncaught exception for the time being. Reviewed By: javache Differential Revision: D2685322 fb-gh-sync-id: 52956d3db20809cc90448bd080795754b899435e
This commit is contained in:
parent
aad4bc9231
commit
db617e56a3
24
Libraries/vendor/emitter/EventEmitter.js
vendored
24
Libraries/vendor/emitter/EventEmitter.js
vendored
@ -1,16 +1,10 @@
|
||||
/**
|
||||
* @generated SignedSource<<494e66dea72a3e90b763a5ec50b1e0ca>>
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* !! This file is a check-in of a static_upstream project! !!
|
||||
* !! !!
|
||||
* !! You should not modify this file directly. Instead: !!
|
||||
* !! 1) Use `fjs use-upstream` to temporarily replace this with !!
|
||||
* !! the latest version from upstream. !!
|
||||
* !! 2) Make your changes, test them, etc. !!
|
||||
* !! 3) Use `fjs push-upstream` to copy your changes back to !!
|
||||
* !! static_upstream. !!
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule EventEmitter
|
||||
* @typechecks
|
||||
@ -164,13 +158,9 @@ class EventEmitter {
|
||||
// The subscription may have been removed during this event loop.
|
||||
if (subscription) {
|
||||
this._currentSubscription = subscription;
|
||||
|
||||
ErrorUtils.applyWithGuard(
|
||||
subscription.listener,
|
||||
subscription.listener.apply(
|
||||
subscription.context,
|
||||
Array.prototype.slice.call(arguments, 1),
|
||||
null,
|
||||
'EventEmitter:' + eventType
|
||||
Array.prototype.slice.call(arguments, 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user