diff --git a/src/flux/stores/task-queue.coffee b/src/flux/stores/task-queue.coffee index 788dcf23f..08d943b99 100644 --- a/src/flux/stores/task-queue.coffee +++ b/src/flux/stores/task-queue.coffee @@ -137,7 +137,13 @@ class TaskQueue task.sequentialId = ++@_currentSequentialId @_dequeueObsoleteTasks(task) - task.runLocal().then => + runLocalStart = Date.now() + task.runLocal() + .then => + runLocalTime = Date.now() - runLocalStart + if runLocalTime >= 150 + err = new Error("Task peformLocal took more than 150ms") + NylasEnv.reportError(err, {task: task.toJSON(), duration: runLocalTime, taskName: task.constructor.name}) @_queue.push(task) @_updateSoon() diff --git a/src/nylas-env.coffee b/src/nylas-env.coffee index 723f3abd2..fb8fda82d 100644 --- a/src/nylas-env.coffee +++ b/src/nylas-env.coffee @@ -278,7 +278,7 @@ class NylasEnvConstructor jasmine.getEnv().currentSpec.fail(error) else if @inDevMode() and not noWindows @openDevTools() - @executeJavaScriptInDevTools('DevToolsAPI.showConsole()') + @executeJavaScriptInDevTools("DevToolsAPI.showPanel('console')") @errorLogger.reportError(error, extra)