[INFER] Avoid redundant TypeObject::markUnknown, bug 665289.
authorBrian Hackett <bhackett1024@gmail.com>
Sat, 02 Jul 2011 06:58:06 -0700
changeset 75172 ab061e5730cbeb014a06fd4c500f6c97c181b782
parent 75171 a24aa7a782bfb4e2da91367e3bd9a1f8cb160623
child 75173 ff54e5c320bacbb1df5a4dc109a0ce70add0cbbd
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
bugs665289
milestone7.0a1
[INFER] Avoid redundant TypeObject::markUnknown, bug 665289.
js/src/jit-test/tests/basic/bug665289.js
js/src/jsinfer.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug665289.js
@@ -0,0 +1,4 @@
+delete this.Function;
+a = evalcx("lazy");
+a["Object"] = this;
+if (typeof a.isPrototypeOf == "") {}
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -2656,17 +2656,17 @@ TypeObject::splicePrototype(JSContext *c
     this->instanceNext = proto->getType()->instanceList;
     proto->getType()->instanceList = this;
 
     if (!cx->typeInferenceEnabled())
         return;
 
     AutoEnterTypeInference enter(cx);
 
-    if (proto->getType()->unknownProperties()) {
+    if (proto->getType()->unknownProperties() && !unknownProperties()) {
         markUnknown(cx);
         return;
     }
 
     /*
      * Update properties on this type with any shared with the prototype.
      * :FIXME: do this for instances of this object too.
      */