You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf($compile): validate directive.restrict property on directive init
This allows the removal of try/catch from addDirective to avoid V8 deopt.
Previously the directive.restrict property was not validated. This would
potentially cause exceptions on each compilation of the directive
requiring a try/catch and potentially causing repeated errors.
New validation when directive.restrict is specified:
* must be a string
* must contain at least one valid character (E, A, C, M)
Cases which previously silently failed (now throw an error):
* values with an indexOf method (such as strings, arrays) which returned
returned -1 for all valid restrict characters
Cases which previously worked unintentionally (now throw an error):
* arrays with single-character strings of valid restrict characters
Closesangular#13263
0 commit comments