[ReactNative][madman] Revert D2011598 temporarily

This commit is contained in:
Kevin Gozali
2015-04-23 16:11:34 -07:00
parent 36afc46274
commit ee3986342a

View File

@@ -10,9 +10,7 @@
* @flow
*/
'use strict';
var ErrorUtils = require('ErrorUtils');
var ReactUpdates = require('ReactUpdates');
var invariant = require('invariant');
var warning = require('warning');
@@ -309,23 +307,21 @@ var MessageQueueMixin = {
);
},
processBatch: function(batch) {
processBatch: function (batch) {
var self = this;
ReactUpdates.batchedUpdates(function() {
batch.forEach(function(call) {
invariant(
call.module === 'BatchedBridge',
'All the calls should pass through the BatchedBridge module'
);
if (call.method === 'callFunctionReturnFlushedQueue') {
self.callFunction.apply(self, call.args);
} else if (call.method === 'invokeCallbackAndReturnFlushedQueue') {
self.invokeCallback.apply(self, call.args);
} else {
throw new Error(
'Unrecognized method called on BatchedBridge: ' + call.method);
}
});
batch.forEach(function (call) {
invariant(
call.module === 'BatchedBridge',
'All the calls should pass through the BatchedBridge module'
);
if (call.method === 'callFunctionReturnFlushedQueue') {
self.callFunction.apply(self, call.args);
} else if (call.method === 'invokeCallbackAndReturnFlushedQueue') {
self.invokeCallback.apply(self, call.args);
} else {
throw new Error(
'Unrecognized method called on BatchedBridge: ' + call.method);
}
});
return this.flushedQueue();
},