Skip to content

Commit ee591ac

Browse files
committed
MAGETWO-59587: Debugging and profiling tools for UI Components and Javascript modules
1 parent 6a7209f commit ee591ac

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

app/code/Magento/Ui/view/base/web/js/lib/knockout/template/engine.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ define([
8181
});
8282
}
8383

84-
8584
return source;
8685
} else if (template.nodeType === 1 || template.nodeType === 8) {
8786
source = new ko.templateSources.anonymousTemplate(template);

app/code/Magento/Ui/view/base/web/js/lib/logger/logger-utils.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ define([], function () {
1717
/**
1818
* Method for logging asynchronous operations
1919
* @param {Promise} promise
20-
* @param {object} config
20+
* @param {Object} config
2121
*/
2222
LogUtils.prototype.asyncLog = function (promise, config) {
2323
var levels,
@@ -29,11 +29,10 @@ define([], function () {
2929
messages = config.messages || this.createMessages();
3030
wait = config.wait || 5000;
3131

32-
3332
this.logger[levels.requested](messages.requested, config.data);
3433
setTimeout(function () {
3534
promise.state() === 'pending' ?
36-
this.logger[levels.failed](messages.failed, config.data):
35+
this.logger[levels.failed](messages.failed, config.data) :
3736
this.logger[levels.loaded](messages.loaded, config.data);
3837
}.bind(this), wait)
3938
};

lib/web/mage/requirejs/text.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,23 @@ define(['module'], function (module) {
100100
}
101101
}
102102

103+
/**
104+
* @override
105+
*
106+
* @param {Event} evt
107+
*/
103108
xhr.onreadystatechange = function (evt) {
104109
var status, err;
105110
//Do not explicitly handle errors, those should be
106111
//visible via console output in the browser.
107112
if (xhr.readyState === 4) {
108113
status = xhr.status || 0;
114+
109115
if (status > 399 && status < 600) {
110116
//An http 4xx or 5xx error. Signal an error.
111117
err = new Error(url + ' HTTP status: ' + status);
112118
err.xhr = xhr;
119+
113120
if (fail) {
114121
fail(err);
115122
}

0 commit comments

Comments
 (0)