Fix for bug 693894 (NodeList crash [@ js::GetObjectShape]). r=jst.

--HG--
extra : rebase_source : fe485e60f87633861c3aadde95c29af6d81ddcc9
This commit is contained in:
Peter Van der Beken 2011-10-13 14:40:20 +02:00
parent 40feabd0e0
commit d636007fe7
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,8 @@
<!DOCTYPE html>
<script>
var nodeList = document.getElementsByName("html");
nodeList.__proto__ = null;
nodeList.x;
</script>

View File

@ -29,3 +29,4 @@ load 612018-1.html
load 637116.html
load 666869.html
load 675621-1.html
load 693894.html

View File

@ -918,6 +918,9 @@ ListBase<LC>::getPropertyOnPrototype(JSContext *cx, JSObject *proxy, jsid id, bo
js::Value *vp)
{
JSObject *proto = js::GetObjectProto(proxy);
if (!proto)
return true;
bool hit;
if (getProtoShape(proxy) != js::GetObjectShape(proto)) {
if (!shouldCacheProtoShape(cx, proto, &hit))