Bug 914098 - Add needed unknownObject() call, r=jandem.

This commit is contained in:
Brian Hackett 2013-09-11 07:14:44 -07:00
parent 63fd9c1e88
commit 0efe71334d
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,16 @@
// |jit-test| error: TypeError
function ygTreeView(id) {};
function ygNode() {}
ygNode.prototype.init = function () {
this.children = [];
}
ygTextNode.prototype = new ygNode;
function ygTextNode() {
this.init(it.next.bind(it), StopIteration)
}
userTree = new ygTreeView("userTree")
addMenuNode(userTree)
function addMenuNode(tree) {
new ygTextNode({}, tree.root, false)
}

View File

@ -2882,7 +2882,7 @@ types::AddClearDefiniteFunctionUsesInScript(JSContext *cx, TypeObject *type,
for (unsigned i = 0; i < count; i++) {
TypeSet *types = &typeArray[i];
if (types->getObjectCount() == 1) {
if (!types->unknownObject() && types->getObjectCount() == 1) {
if (calleeKey != types->getObject(0)) {
// Also check if the object is the Function.call or
// Function.apply native. IonBuilder uses the presence of these