tslint, logs
This commit is contained in:
Родитель
14a492ef79
Коммит
a3b977d5a5
|
@ -199,12 +199,14 @@ export class SourceMaps implements ISourceMaps {
|
|||
private _createSourceMap(mapPath: string, pathToGenerated: string): Promise<SourceMap> {
|
||||
let contentsP: Promise<string>;
|
||||
if (utils.isURL(mapPath)) {
|
||||
Logger.log(`SourceMaps.createSourceMap: Downloading sourcemap file from ${mapPath}`);
|
||||
contentsP = utils.getURL(mapPath).catch(e => {
|
||||
Logger.log(`SourceMaps.createSourceMap: Could not download map from ${mapPath}`);
|
||||
return null;
|
||||
});
|
||||
} else {
|
||||
contentsP = new Promise((resolve, reject) => {
|
||||
Logger.log(`SourceMaps.createSourceMap: Reading local sourcemap file from ${mapPath}`);
|
||||
FS.readFile(mapPath, (err, data) => {
|
||||
if (err) {
|
||||
Logger.log(`SourceMaps.createSourceMap: Could not read map from ${mapPath}`);
|
||||
|
|
|
@ -165,10 +165,8 @@ suite('Utilities', () => {
|
|||
test('when the function fails, it rejects', () => {
|
||||
return Utilities.retryAsync(() => Utilities.errP('fail'), /*timeoutMs=*/5)
|
||||
.then(
|
||||
() => assert.fail('This promise should fail'),
|
||||
e => {
|
||||
assert.equal(e.message, 'fail');
|
||||
});
|
||||
() => assert.fail('This promise should fail'),
|
||||
e => assert.equal(e.message, 'fail'));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -297,8 +297,8 @@ export function remoteObjectToValue(object: WebKitProtocol.Runtime.RemoteObject,
|
|||
let value = '';
|
||||
let variableHandleRef: string;
|
||||
|
||||
if (object) { // just paranoia?
|
||||
if (object && object.type === 'object') {
|
||||
if (object) {
|
||||
if (object.type === 'object') {
|
||||
if (object.subtype === 'null') {
|
||||
value = 'null';
|
||||
} else {
|
||||
|
@ -306,7 +306,7 @@ export function remoteObjectToValue(object: WebKitProtocol.Runtime.RemoteObject,
|
|||
variableHandleRef = object.objectId;
|
||||
value = object.description;
|
||||
}
|
||||
} else if (object && object.type === 'undefined') {
|
||||
} else if (object.type === 'undefined') {
|
||||
value = 'undefined';
|
||||
} else if (object.type === 'function') {
|
||||
const firstBraceIdx = object.description.indexOf('{');
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче