Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14671 from alivedise/bugzilla/949209/publish
Browse files Browse the repository at this point in the history
Bug 949209 - Publish custom detail with window, r=timdream
  • Loading branch information
alivedise committed Dec 16, 2013
2 parents 6c964e4 + c777c21 commit ecb7688
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion apps/system/js/app_transition_controller.js
Expand Up @@ -201,9 +201,11 @@
return;

if (this.app.loaded) {
// Perf test needs.
this.app.publish('loadtime', {
time: parseInt(Date.now() - this.app.launchTime),
type: 'w'
type: 'w',
src: this.app.config.url
});
}

Expand Down
4 changes: 3 additions & 1 deletion apps/system/js/app_window.js
Expand Up @@ -552,9 +552,11 @@
AppWindow.prototype._handle_mozbrowserloadend =
function aw__handle_mozbrowserloadend(evt) {
if (!this.loaded) {
// Perf test needs.
this.publish('loadtime', {
time: parseInt(Date.now() - this.launchTime),
type: 'c'
type: 'c',
src: this.config.url
});
}
this.loading = false;
Expand Down
1 change: 0 additions & 1 deletion tests/performance/performance_helper.js
Expand Up @@ -59,7 +59,6 @@ function PerformanceHelper(opts) {
'}' +
'w.onapplicationloaded = function(e) {' +
' var data = e.detail;' +
' data.src = e.target.src;' +
' w.loadTimes.push(data);' +
'};' +
'w.addEventListener("apploadtime", w.onapplicationloaded);';
Expand Down

0 comments on commit ecb7688

Please sign in to comment.