angular-cn/integration/_payload-limits.json

38 lines
791 B
JSON
Raw Normal View History

{
"cli-hello-world": {
"master": {
"uncompressed": {
"runtime": 1497,
"main": 166799,
"polyfills": 43626
}
}
},
"cli-hello-world-ivy-minimal": {
"master": {
"uncompressed": {
"runtime": 1440,
fix(ivy): don't mask errors by calling lifecycle hooks after a crash (#31244) The Angular runtime frequently calls into user code (for example, when writing to a property binding). Since user code can throw errors, calls to it are frequently wrapped in a try-finally block. In Ivy, the following pattern is common: ```typescript enterView(); try { callUserCode(); } finally { leaveView(); } ``` This has a significant problem, however: `leaveView` has a side effect: it calls any pending lifecycle hooks that might've been scheduled during the current round of change detection. Generally it's a bad idea to run lifecycle hooks after the application has crashed. The application is in an inconsistent state - directives may not be instantiated fully, queries may not be resolved, bindings may not have been applied, etc. Invariants that the app code relies upon may not hold. Further crashes or broken behavior are likely. Frequently, lifecycle hooks are used to make assertions about these invariants. When these assertions fail, they will throw and "swallow" the original error, making debugging of the problem much more difficult. This commit modifies `leaveView` to understand whether the application is currently crashing, via a parameter `safeToRunHooks`. This parameter is set by modifying the above pattern: ```typescript enterView(); let safeToRunHooks = false; try { callUserCode(); safeToRunHooks = true; } finally { leaveView(..., safeToRunHooks); } ``` If `callUserCode` crashes, then `safeToRunHooks` will never be set to `true` and `leaveView` won't call any further user code. The original error will then propagate back up the stack and be reported correctly. A test is added to verify this behavior. PR Close #31244
2019-06-24 16:14:05 -04:00
"main": 14847,
"polyfills": 43567
}
}
},
"cli-hello-world-ivy-compat": {
"master": {
"uncompressed": {
"runtime": 1440,
2019-05-30 15:54:39 -04:00
"main": 149248,
"polyfills": 43567
}
}
},
"hello_world__closure": {
"master": {
"uncompressed": {
"bundle": "TODO(i): temporarily increase the payload size limit from 105779 - this is due to a closure issue related to ESM reexports that still needs to be investigated",
"bundle": 179825
}
}
}
2019-05-30 15:54:39 -04:00
}