Bug 996536 - Don't assume that all interpretedLazy functions have a lazyScript. r=bhackett, a=lsblakk
authorTill Schneidereit <till@tillschneidereit.net>
Fri, 25 Apr 2014 10:40:17 +0200
changeset 192154 3debec91f196b886d5a94cdce858d63ef5349181
parent 192153 92eb6a82595cb1c3cdf7270fab341e1b36cf9933
child 192155 dc37cd737acd4143d3f2c0d25d1dde32e7f603c4
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett, lsblakk
bugs996536
milestone30.0a2
Bug 996536 - Don't assume that all interpretedLazy functions have a lazyScript. r=bhackett, a=lsblakk
js/src/jsinfer.cpp
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -3879,17 +3879,17 @@ ExclusiveContext::getNewType(const Class
 
     if (!newTypeObjects.initialized() && !newTypeObjects.init())
         return nullptr;
 
     // Canonicalize new functions to use the original one associated with its script.
     if (fun) {
         if (fun->hasScript())
             fun = fun->nonLazyScript()->functionNonDelazifying();
-        else if (fun->isInterpretedLazy())
+        else if (fun->isInterpretedLazy() && !fun->isSelfHostedBuiltin())
             fun = fun->lazyScript()->functionNonDelazifying();
         else
             fun = nullptr;
     }
 
     TypeObjectWithNewScriptSet::AddPtr p =
         newTypeObjects.lookupForAdd(TypeObjectWithNewScriptSet::Lookup(clasp, proto, fun));
     if (p) {