summaryrefslogtreecommitdiffstats
path: root/js/src/jit/OptimizationTracking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit/OptimizationTracking.cpp')
-rw-r--r--js/src/jit/OptimizationTracking.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/src/jit/OptimizationTracking.cpp b/js/src/jit/OptimizationTracking.cpp
index 7d72795a0..308def041 100644
--- a/js/src/jit/OptimizationTracking.cpp
+++ b/js/src/jit/OptimizationTracking.cpp
@@ -844,6 +844,8 @@ MaybeConstructorFromType(TypeSet::Type ty)
return nullptr;
ObjectGroup* obj = ty.group();
TypeNewScript* newScript = obj->newScript();
+ if (!newScript && obj->maybeUnboxedLayout())
+ newScript = obj->unboxedLayout().newScript();
return newScript ? newScript->function() : nullptr;
}