mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 987111 - Add an assign() method to MutablePropertyDescriptorOperations. r=terrence
It's unfortunate the we need to operate on the raw JSPropertyDescriptor for |other|, but the specialization that makes Handle<JSPropertyDescriptor> work is declared later in the file, which isn't kosher.
This commit is contained in:
parent
f5f076c2ef
commit
ba47e0abf3
@ -2935,6 +2935,14 @@ class MutablePropertyDescriptorOperations : public PropertyDescriptorOperations<
|
|||||||
value().setUndefined();
|
value().setUndefined();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void assign(JSPropertyDescriptor &other) {
|
||||||
|
object().set(other.obj);
|
||||||
|
setAttributes(other.attrs);
|
||||||
|
setGetter(other.getter);
|
||||||
|
setSetter(other.setter);
|
||||||
|
value().set(other.value);
|
||||||
|
}
|
||||||
|
|
||||||
JS::MutableHandleObject object() {
|
JS::MutableHandleObject object() {
|
||||||
return JS::MutableHandleObject::fromMarkedLocation(&desc()->obj);
|
return JS::MutableHandleObject::fromMarkedLocation(&desc()->obj);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user