mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #967 from syranide/noie8catch
Remove unnecessary catch-clauses for try-finally
This commit is contained in:
@@ -1001,8 +1001,6 @@ var ReactCompositeComponentMixin = {
|
||||
this._currentContext = nextFullContext;
|
||||
this.context = nextContext;
|
||||
}
|
||||
} catch (e) {
|
||||
throw e;
|
||||
} finally {
|
||||
this._compositeLifeCycleState = null;
|
||||
}
|
||||
@@ -1164,9 +1162,6 @@ var ReactCompositeComponentMixin = {
|
||||
ReactCurrentOwner.current = this;
|
||||
try {
|
||||
renderedComponent = this.render();
|
||||
} catch (error) {
|
||||
// IE8 requires `catch` in order to use `finally`.
|
||||
throw error;
|
||||
} finally {
|
||||
ReactContext.current = previousContext;
|
||||
ReactCurrentOwner.current = null;
|
||||
|
||||
@@ -56,9 +56,6 @@ var ReactContext = {
|
||||
ReactContext.current = merge(previousContext, newContext);
|
||||
try {
|
||||
result = scopedCallback();
|
||||
} catch (error) {
|
||||
// IE8 requires `catch` in order to use `finally`.
|
||||
throw error;
|
||||
} finally {
|
||||
ReactContext.current = previousContext;
|
||||
}
|
||||
|
||||
@@ -79,9 +79,6 @@ function flushBatchedUpdates() {
|
||||
// Run these in separate functions so the JIT can optimize
|
||||
try {
|
||||
runBatchedUpdates();
|
||||
} catch (e) {
|
||||
// IE 8 requires catch to use finally.
|
||||
throw e;
|
||||
} finally {
|
||||
clearDirtyComponents();
|
||||
}
|
||||
|
||||
@@ -737,8 +737,6 @@ describe('ReactCompositeComponent', function() {
|
||||
);
|
||||
|
||||
NamedComponent(); // Shut up lint
|
||||
} catch (e) {
|
||||
throw e;
|
||||
} finally {
|
||||
console.warn = warn;
|
||||
}
|
||||
@@ -780,8 +778,6 @@ describe('ReactCompositeComponent', function() {
|
||||
'createClass(...): `childContextTypes` is now a static property and ' +
|
||||
'should be defined inside "statics".'
|
||||
);
|
||||
} catch (e) {
|
||||
throw e;
|
||||
} finally {
|
||||
console.warn = warn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user