Skip to content
This repository has been archived by the owner on May 26, 2018. It is now read-only.

Commit

Permalink
Remove case causing too much recursion in metrics pings (#460)
Browse files Browse the repository at this point in the history
- fixes #455
- fixes #457
  • Loading branch information
meandavejustice committed Oct 21, 2016
1 parent 595fe1d commit 548c80d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/send-metrics-data.js
Expand Up @@ -4,18 +4,14 @@ const {Cu} = require('chrome');
Cu.import('resource://gre/modules/Services.jsm');

const { getActiveView } = require('sdk/view/core');
const { setTimeout } = require('sdk/timers');

module.exports = sendMetricsData;

function sendMetricsData(o, panel) {
// Note: panel is optional, used to avoid circular refs with panel-utils.js.
panel = panel || require('./panel-utils.js').getPanel();

// If the panel's missing, try again a few seconds later.
if (!panel) {
return setTimeout(() => { sendMetricsData(o) }, 10 * 1000);
}
if (!panel) return;

const coords = getActiveView(panel).getBoundingClientRect();
// NOTE: this packet follows a predefined data format and cannot be changed
Expand Down

0 comments on commit 548c80d

Please sign in to comment.