Bug 578041: eager-this With objects and non-default getters. (r=jorendorff)

--HG--
extra : rebase_source : b25db67f7d0a6069ffbc5281f4e3c5044e1d1b92
This commit is contained in:
Chris Leary 2010-08-06 16:21:29 -07:00
parent b3eb68b6e5
commit fdd3d88c3f
2 changed files with 9 additions and 1 deletions

View File

@ -4968,7 +4968,10 @@ BEGIN_CASE(JSOP_CALLNAME)
goto error;
} else {
sprop = (JSScopeProperty *)prop;
NATIVE_GET(cx, obj, obj2, sprop, JSGET_METHOD_BARRIER, &rval);
JSObject *normalized = obj;
if (normalized->getClass() == &js_WithClass && !sprop->hasDefaultGetter())
normalized = js_UnwrapWithObject(cx, normalized);
NATIVE_GET(cx, normalized, obj2, sprop, JSGET_METHOD_BARRIER, &rval);
JS_UNLOCK_OBJ(cx, obj2);
}

View File

@ -0,0 +1,5 @@
// |trace-test| error: invalid arguments
__defineGetter__('x', Float32Array);
with(this)
x;