Bug 771081 - part3: Rename WaiveXrayWrapperWrapper. r=gal

This commit is contained in:
Gabor Krizsanits 2012-07-16 19:28:17 +02:00
Родитель daedb73cec
Коммит 706531453b
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -29,7 +29,7 @@ namespace xpc {
// transparent wrapper in the origin (non-chrome) compartment. When // transparent wrapper in the origin (non-chrome) compartment. When
// an object with that special wrapper applied crosses into chrome, // an object with that special wrapper applied crosses into chrome,
// we know to not apply an X-ray wrapper. // we know to not apply an X-ray wrapper.
DirectWrapper WaiveXrayWrapperWrapper(WrapperFactory::WAIVE_XRAY_WRAPPER_FLAG); DirectWrapper XrayWaiver(WrapperFactory::WAIVE_XRAY_WRAPPER_FLAG);
// When objects for which we waived the X-ray wrapper cross into // When objects for which we waived the X-ray wrapper cross into
// chrome, we wrap them into a special cross-compartment wrapper // chrome, we wrap them into a special cross-compartment wrapper
@ -81,7 +81,7 @@ WrapperFactory::WaiveXray(JSContext *cx, JSObject *obj)
if (!ac.enter(cx, obj) || !JS_WrapObject(cx, &proto)) if (!ac.enter(cx, obj) || !JS_WrapObject(cx, &proto))
return nsnull; return nsnull;
wobj = Wrapper::New(cx, obj, proto, JS_GetGlobalForObject(cx, obj), wobj = Wrapper::New(cx, obj, proto, JS_GetGlobalForObject(cx, obj),
&WaiveXrayWrapperWrapper); &XrayWaiver);
if (!wobj) if (!wobj)
return nsnull; return nsnull;
@ -291,7 +291,7 @@ WrapperFactory::Rewrap(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSO
unsigned flags) unsigned flags)
{ {
NS_ASSERTION(!IsWrapper(obj) || NS_ASSERTION(!IsWrapper(obj) ||
GetProxyHandler(obj) == &WaiveXrayWrapperWrapper || GetProxyHandler(obj) == &XrayWaiver ||
js::GetObjectClass(obj)->ext.innerObject, js::GetObjectClass(obj)->ext.innerObject,
"wrapped object passed to rewrap"); "wrapped object passed to rewrap");
NS_ASSERTION(JS_GetClass(obj) != &XrayUtils::HolderClass, "trying to wrap a holder"); NS_ASSERTION(JS_GetClass(obj) != &XrayUtils::HolderClass, "trying to wrap a holder");

Просмотреть файл

@ -90,7 +90,7 @@ class WrapperFactory {
static JSObject *WrapComponentsObject(JSContext *cx, JSObject *obj); static JSObject *WrapComponentsObject(JSContext *cx, JSObject *obj);
}; };
extern js::DirectWrapper WaiveXrayWrapperWrapper; extern js::DirectWrapper XrayWaiver;
} }