Don't try to waive Xray wrapper for primitives (604361, r=mrbkap).

--HG--
extra : transplant_source : W%8A%EA%CD%A0%9A%87%91%0F%F6%E6%9D%85%19%06%10%A3%1A%09%02
This commit is contained in:
Andreas Gal 2010-10-14 13:41:52 -07:00
parent ec0f0943fa
commit aefc3b6839
2 changed files with 3 additions and 3 deletions

View File

@ -677,7 +677,7 @@ jsd_GetValueParent(JSDContext* jsdc, JSDValue* jsdval)
if(!(obj = JSVAL_TO_OBJECT(jsdval->val)))
return NULL;
JS_BeginRequest(jsdc->dumbContext);
call = JS_EnterCrossCompartmentCall(jsdc->dumbContext, jsdc->glob);
call = JS_EnterCrossCompartmentCall(jsdc->dumbContext,obj);
if(!call) {
JS_EndRequest(jsdc->dumbContext);

View File

@ -283,8 +283,8 @@ WrapperFactory::WrapLocationObject(JSContext *cx, JSObject *obj)
bool
WrapperFactory::WaiveXrayAndWrap(JSContext *cx, jsval *vp)
{
if (!JSVAL_IS_OBJECT(*vp))
return true;
if (JSVAL_IS_PRIMITIVE(*vp))
return JS_WrapValue(cx, vp);
JSObject *obj = JSVAL_TO_OBJECT(*vp)->unwrap();