mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 965898 - All properties on cross-origin DOM objects should be |own|. r=gabor
This commit is contained in:
parent
c186e009c9
commit
650ed7043d
@ -178,6 +178,31 @@ CrossOriginXrayWrapper::~CrossOriginXrayWrapper()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
CrossOriginXrayWrapper::getPropertyDescriptor(JSContext *cx,
|
||||
JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc) const
|
||||
{
|
||||
if (!SecurityXrayDOM::getPropertyDescriptor(cx, wrapper, id, desc))
|
||||
return false;
|
||||
if (desc.object()) {
|
||||
// All properties on cross-origin DOM objects are |own|.
|
||||
desc.object().set(wrapper);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CrossOriginXrayWrapper::getOwnPropertyDescriptor(JSContext *cx,
|
||||
JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc) const
|
||||
{
|
||||
// All properties on cross-origin DOM objects are |own|.
|
||||
return getPropertyDescriptor(cx, wrapper, id, desc);
|
||||
}
|
||||
|
||||
#define XOW FilteringWrapper<CrossOriginXrayWrapper, CrossOriginAccessiblePropertiesOnly>
|
||||
#define NNXOW FilteringWrapper<CrossCompartmentSecurityWrapper, Opaque>
|
||||
#define NNXOWC FilteringWrapper<CrossCompartmentSecurityWrapper, OpaqueWithCall>
|
||||
|
@ -61,6 +61,13 @@ class CrossOriginXrayWrapper : public SecurityXrayDOM {
|
||||
public:
|
||||
CrossOriginXrayWrapper(unsigned flags);
|
||||
virtual ~CrossOriginXrayWrapper();
|
||||
|
||||
virtual bool getPropertyDescriptor(JSContext *cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc) const MOZ_OVERRIDE;
|
||||
virtual bool getOwnPropertyDescriptor(JSContext *cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc) const MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user