Finish backing out changeset 652bd0eed005

This commit is contained in:
Blake Kaplan 2011-04-08 15:58:42 -07:00
Родитель c42152d63a a345a77b43
Коммит 8c5399ee78
1 изменённых файлов: 3 добавлений и 18 удалений

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

@ -279,23 +279,8 @@ WrapperFactory::Rewrap(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSO
return nsnull;
}
}
JSObject *inner = obj;
OBJ_TO_INNER_OBJECT(cx, inner);
XPCWrappedNative *wn;
if (IS_WN_WRAPPER(inner) &&
(wn = static_cast<XPCWrappedNative *>(inner->getPrivate()))->HasProto() &&
wn->GetProto()->ClassIsDOMObject()) {
typedef XrayWrapper<JSCrossCompartmentWrapper> Xray;
wrapper = &FilteringWrapper<Xray,
CrossOriginAccessiblePropertiesOnly>::singleton;
xrayHolder = Xray::createHolder(cx, obj, parent);
if (!xrayHolder)
return nsnull;
} else {
wrapper = &FilteringWrapper<JSCrossCompartmentWrapper,
ExposedPropertiesOnly>::singleton;
}
wrapper = &FilteringWrapper<JSCrossCompartmentWrapper,
ExposedPropertiesOnly>::singleton;
} else if (AccessCheck::isSameOrigin(origin, target)) {
// Same origin we use a transparent wrapper, unless the compartment asks
// for an Xray or the wrapper needs a SOW.
@ -332,7 +317,7 @@ WrapperFactory::Rewrap(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSO
wrapper = &FilteringWrapper<Xray,
SameOriginOrCrossOriginAccessiblePropertiesOnly>::singleton;
} else {
wrapper = &FilteringWrapper<Xray,
wrapper= &FilteringWrapper<Xray,
CrossOriginAccessiblePropertiesOnly>::singleton;
}