build: reformat repo to new clang@1.4.0 (#36613)

PR Close #36613
This commit is contained in:
Joey Perrott
2020-04-13 16:40:21 -07:00
committed by atscott
parent 5e80e7e216
commit 698b0288be
1160 changed files with 31667 additions and 24000 deletions

View File

@ -12,7 +12,7 @@
import {findEventTasks} from '../common/events';
import {patchTimer} from '../common/timers';
import {ZONE_SYMBOL_ADD_EVENT_LISTENER, ZONE_SYMBOL_REMOVE_EVENT_LISTENER, patchClass, patchMethod, patchPrototype, scheduleMacroTaskWithCurrentZone, zoneSymbol} from '../common/utils';
import {patchClass, patchMethod, patchPrototype, scheduleMacroTaskWithCurrentZone, ZONE_SYMBOL_ADD_EVENT_LISTENER, ZONE_SYMBOL_REMOVE_EVENT_LISTENER, zoneSymbol} from '../common/utils';
import {patchCustomElements} from './custom-elements';
import {eventTargetPatch, patchEvent} from './event-target';
@ -99,7 +99,9 @@ Zone.__load_patch('XHR', (global: any, Zone: ZoneType) => {
}
const XMLHttpRequestPrototype: any = XMLHttpRequest.prototype;
function findPendingTask(target: any) { return target[XHR_TASK]; }
function findPendingTask(target: any) {
return target[XHR_TASK];
}
let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
@ -170,7 +172,7 @@ Zone.__load_patch('XHR', (global: any, Zone: ZoneType) => {
if (!storedTask) {
target[XHR_TASK] = task;
}
sendNative !.apply(target, data.args);
sendNative!.apply(target, data.args);
target[XHR_SCHEDULED] = true;
return task;
}
@ -182,14 +184,14 @@ Zone.__load_patch('XHR', (global: any, Zone: ZoneType) => {
// Note - ideally, we would call data.target.removeEventListener here, but it's too late
// to prevent it from firing. So instead, we store info for the event listener.
data.aborted = true;
return abortNative !.apply(data.target, data.args);
return abortNative!.apply(data.target, data.args);
}
const openNative =
patchMethod(XMLHttpRequestPrototype, 'open', () => function(self: any, args: any[]) {
self[XHR_SYNC] = args[2] == false;
self[XHR_URL] = args[1];
return openNative !.apply(self, args);
return openNative!.apply(self, args);
});
const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';
@ -201,11 +203,11 @@ Zone.__load_patch('XHR', (global: any, Zone: ZoneType) => {
// a fetch is scheduling, so we are using xhr to polyfill fetch
// and because we already schedule macroTask for fetch, we should
// not schedule a macroTask for xhr again
return sendNative !.apply(self, args);
return sendNative!.apply(self, args);
}
if (self[XHR_SYNC]) {
// if the XHR is sync there is no task to schedule, just execute the code.
return sendNative !.apply(self, args);
return sendNative!.apply(self, args);
} else {
const options: XHROptions =
{target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false};
@ -235,7 +237,7 @@ Zone.__load_patch('XHR', (global: any, Zone: ZoneType) => {
task.zone.cancelTask(task);
} else if ((Zone.current as any)[fetchTaskAborting] === true) {
// the abort is called from fetch polyfill, we need to call native abort of XHR.
return abortNative !.apply(self, args);
return abortNative!.apply(self, args);
}
// Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no
// task