Bug 1364573 - Don't relazify class default constructors.

Because of the wacko way we handle toString offsets for class default constructors, those offsets cannot be recovered if we relazify the functions.
Luckily there's no reason to relazify them, their JSScripts are very small: either a single 'retrval' for non-derived, and still fairly small for derived.
This commit is contained in:
Gaming4JC 2019-07-13 23:10:10 -04:00 committed by Roy Tam
commit 3f8f224e12

View file

@ -1494,6 +1494,7 @@ class JSScript : public js::gc::TenuredCell
bool isRelazifiable() const {
return (selfHosted() || lazyScript) && !hasInnerFunctions_ && !types_ &&
!isGenerator() && !hasBaselineScript() && !hasAnyIonScript() &&
!isDefaultClassConstructor() &&
!doNotRelazify_;
}
void setLazyScript(js::LazyScript* lazy) {