perf: Don’t subclass Error; resulting in smaller binary (#14160)
Subclassing errors is problematic since Error returns a new instance. All of the patching which we do than prevent proper application of source maps. PR Close #14160
This commit is contained in:

committed by
Miško Hevery

parent
3c2842be96
commit
c33fda2607
@ -1436,21 +1436,21 @@ export function main() {
|
||||
|
||||
bootstrap(platformBrowserDynamic(), Ng2Module, elementA, ng1Module).then(() => {
|
||||
expect(mockExceptionHandler).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||
originalError: new Error(
|
||||
ngOriginalError: new Error(
|
||||
'Unable to find required \'iDoNotExist\' in upgraded directive \'ng1A\'.')
|
||||
}));
|
||||
});
|
||||
|
||||
bootstrap(platformBrowserDynamic(), Ng2Module, elementB, ng1Module).then(() => {
|
||||
expect(mockExceptionHandler).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||
originalError: new Error(
|
||||
ngOriginalError: new Error(
|
||||
'Unable to find required \'^iDoNotExist\' in upgraded directive \'ng1B\'.')
|
||||
}));
|
||||
});
|
||||
|
||||
bootstrap(platformBrowserDynamic(), Ng2Module, elementC, ng1Module).then(() => {
|
||||
expect(mockExceptionHandler).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||
originalError: new Error(
|
||||
ngOriginalError: new Error(
|
||||
'Unable to find required \'^^iDoNotExist\' in upgraded directive \'ng1C\'.')
|
||||
}));
|
||||
});
|
||||
|
Reference in New Issue
Block a user