Closed
Bug 1124471
Opened 9 years ago
Closed 9 years ago
sendMetric should have a callback run when the metric is finished sending
Categories
(Snippets :: Service, defect)
Snippets
Service
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: osmose, Assigned: giorgos, Mentored)
Details
The sendMetric function in the snippet JS currently triggers an async HTTP request and returns, meaning that code run after the function is called could do something that aborts the HTTP request by accident, like changing window.location. sendMetric should have a callback argument that gets executed once the HTTP request is finished.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → giorgos
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
Fixed! https://github.com/mozilla/snippets-service/commit/c9808df354fe0aa27539f86437ca49d95e8d4cb9
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 2•9 years ago
|
||
Need to call callback even if we 're not sending the metric. https://github.com/mozilla/snippets-service/pull/96
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 3•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/snippets-service https://github.com/mozilla/snippets-service/commit/1f5ec7ad041f487be306b5a8fabdcba9e2a6fb1e [bug 1124471] Call callback even if we're not sending the metric.
Assignee | ||
Updated•9 years ago
|
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•