From 706531453ba0b25385dac4697afcf010ea356c5f Mon Sep 17 00:00:00 2001 From: Gabor Krizsanits Date: Mon, 16 Jul 2012 19:28:17 +0200 Subject: [PATCH] Bug 771081 - part3: Rename WaiveXrayWrapperWrapper. r=gal --- js/xpconnect/wrappers/WrapperFactory.cpp | 6 +++--- js/xpconnect/wrappers/WrapperFactory.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index abd160186b00..b5a925944dab 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -29,7 +29,7 @@ namespace xpc { // transparent wrapper in the origin (non-chrome) compartment. When // an object with that special wrapper applied crosses into chrome, // 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 // 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)) return nsnull; wobj = Wrapper::New(cx, obj, proto, JS_GetGlobalForObject(cx, obj), - &WaiveXrayWrapperWrapper); + &XrayWaiver); if (!wobj) return nsnull; @@ -291,7 +291,7 @@ WrapperFactory::Rewrap(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSO unsigned flags) { NS_ASSERTION(!IsWrapper(obj) || - GetProxyHandler(obj) == &WaiveXrayWrapperWrapper || + GetProxyHandler(obj) == &XrayWaiver || js::GetObjectClass(obj)->ext.innerObject, "wrapped object passed to rewrap"); NS_ASSERTION(JS_GetClass(obj) != &XrayUtils::HolderClass, "trying to wrap a holder"); diff --git a/js/xpconnect/wrappers/WrapperFactory.h b/js/xpconnect/wrappers/WrapperFactory.h index 7423e4a07ff7..b58d67dab6ff 100644 --- a/js/xpconnect/wrappers/WrapperFactory.h +++ b/js/xpconnect/wrappers/WrapperFactory.h @@ -90,7 +90,7 @@ class WrapperFactory { static JSObject *WrapComponentsObject(JSContext *cx, JSObject *obj); }; -extern js::DirectWrapper WaiveXrayWrapperWrapper; +extern js::DirectWrapper XrayWaiver; }