Move BridgeProfile call to give better systrace info

Reviewed By: tadeuzagallo, sahrens

Differential Revision: D2697510

fb-gh-sync-id: 00ec4d5835331b78c554c904dd29661dad9f6f97
This commit is contained in:
Mike Armstrong 2015-11-27 00:12:36 -08:00 committed by facebook-github-bot-5
parent 9c322df7b8
commit e1533fdff6
1 changed files with 1 additions and 1 deletions

View File

@ -146,12 +146,12 @@ class MessageQueue {
} }
__callFunction(module, method, args) { __callFunction(module, method, args) {
BridgeProfiling.profile(() => `${module}.${method}(${stringifySafe(args)})`);
this._lastFlush = new Date().getTime(); this._lastFlush = new Date().getTime();
if (isFinite(module)) { if (isFinite(module)) {
method = this._methodTable[module][method]; method = this._methodTable[module][method];
module = this._moduleTable[module]; module = this._moduleTable[module];
} }
BridgeProfiling.profile(() => `${module}.${method}(${stringifySafe(args)})`);
if (__DEV__ && SPY_MODE) { if (__DEV__ && SPY_MODE) {
console.log('N->JS : ' + module + '.' + method + '(' + JSON.stringify(args) + ')'); console.log('N->JS : ' + module + '.' + method + '(' + JSON.stringify(args) + ')');
} }