mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1242214 - Rename JSPropertyDescriptor JS::PropertyDescriptor everywhere else. r=smaug
This commit is contained in:
parent
32bc8216b8
commit
cb916a48e0
@ -2242,7 +2242,7 @@ Navigator::GetMozAudioChannelManager(ErrorResult& aRv)
|
||||
bool
|
||||
Navigator::DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObject,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
{
|
||||
// Note: Keep this in sync with MayResolve.
|
||||
if (!JSID_IS_STRING(aId)) {
|
||||
|
@ -305,7 +305,7 @@ public:
|
||||
|
||||
bool DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObject,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc);
|
||||
// The return value is whether DoResolve might end up resolving the given id.
|
||||
// If in doubt, return true.
|
||||
static bool MayResolve(jsid aId);
|
||||
|
@ -80,7 +80,7 @@ WindowNamedPropertiesHandler::getOwnPropDescriptor(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aProxy,
|
||||
JS::Handle<jsid> aId,
|
||||
bool /* unused */,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
const
|
||||
{
|
||||
if (!JSID_IS_STRING(aId)) {
|
||||
@ -154,7 +154,7 @@ bool
|
||||
WindowNamedPropertiesHandler::defineProperty(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aProxy,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::Handle<JSPropertyDescriptor> aDesc,
|
||||
JS::Handle<JS::PropertyDescriptor> aDesc,
|
||||
JS::ObjectOpResult &result) const
|
||||
{
|
||||
ErrorResult rv;
|
||||
@ -219,7 +219,7 @@ WindowNamedPropertiesHandler::delete_(JSContext* aCx,
|
||||
static bool
|
||||
ResolveWindowNamedProperty(JSContext* aCx, JS::Handle<JSObject*> aWrapper,
|
||||
JS::Handle<JSObject*> aObj, JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
{
|
||||
{
|
||||
JSAutoCompartment ac(aCx, aObj);
|
||||
|
@ -23,12 +23,12 @@ public:
|
||||
getOwnPropDescriptor(JSContext* aCx, JS::Handle<JSObject*> aProxy,
|
||||
JS::Handle<jsid> aId,
|
||||
bool /* unused */,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
const override;
|
||||
virtual bool
|
||||
defineProperty(JSContext* aCx, JS::Handle<JSObject*> aProxy,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::Handle<JSPropertyDescriptor> aDesc,
|
||||
JS::Handle<JS::PropertyDescriptor> aDesc,
|
||||
JS::ObjectOpResult &result) const override;
|
||||
virtual bool
|
||||
ownPropNames(JSContext* aCx, JS::Handle<JSObject*> aProxy, unsigned flags,
|
||||
|
@ -2123,7 +2123,7 @@ nsContentUtils::IsCallerContentXBL()
|
||||
bool
|
||||
nsContentUtils::LookupBindingMember(JSContext* aCx, nsIContent *aContent,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
{
|
||||
nsXBLBinding* binding = aContent->GetXBLBinding();
|
||||
if (!binding)
|
||||
|
@ -105,7 +105,6 @@ class nsITransferable;
|
||||
class nsPIWindowRoot;
|
||||
class nsIWindowProvider;
|
||||
|
||||
struct JSPropertyDescriptor;
|
||||
struct JSRuntime;
|
||||
|
||||
template<class E> class nsCOMArray;
|
||||
@ -239,7 +238,7 @@ public:
|
||||
|
||||
static bool LookupBindingMember(JSContext* aCx, nsIContent *aContent,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc);
|
||||
|
||||
// Check whether we should avoid leaking distinguishing information to JS/CSS.
|
||||
static bool ShouldResistFingerprinting(nsIDocShell* aDocShell);
|
||||
|
@ -927,7 +927,7 @@ nsDOMClassInfo::Resolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
|
||||
JS::Rooted<JSObject*> global(cx, ::JS_GetGlobalForObject(cx, obj));
|
||||
|
||||
JS::Rooted<JSPropertyDescriptor> desc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> desc(cx);
|
||||
if (!JS_GetPropertyDescriptor(cx, global, mData->mName, &desc)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
@ -1029,7 +1029,7 @@ ResolvePrototype(nsIXPConnect *aXPConnect, nsGlobalWindow *aWin, JSContext *cx,
|
||||
const nsGlobalNameStruct *name_struct,
|
||||
nsScriptNameSpaceManager *nameSpaceManager,
|
||||
JSObject *dot_prototype,
|
||||
JS::MutableHandle<JSPropertyDescriptor> ctorDesc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> ctorDesc);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMClassInfo::PostCreatePrototype(JSContext * cx, JSObject * aProto)
|
||||
@ -1123,7 +1123,7 @@ nsDOMClassInfo::PostCreatePrototype(JSContext * cx, JSObject * aProto)
|
||||
nsScriptNameSpaceManager *nameSpaceManager = GetNameSpaceManager();
|
||||
NS_ENSURE_TRUE(nameSpaceManager, NS_OK);
|
||||
|
||||
JS::Rooted<JSPropertyDescriptor> desc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> desc(cx);
|
||||
nsresult rv = ResolvePrototype(sXPConnect, win, cx, global, mData->mNameUTF16,
|
||||
mData, nullptr, nameSpaceManager, proto,
|
||||
&desc);
|
||||
@ -1506,7 +1506,7 @@ nsDOMConstructor::HasInstance(nsIXPConnectWrappedNative *wrapper,
|
||||
if (!name_struct) {
|
||||
// This isn't a normal DOM object, see if this constructor lives on its
|
||||
// prototype chain.
|
||||
JS::Rooted<JSPropertyDescriptor> desc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> desc(cx);
|
||||
if (!JS_GetPropertyDescriptor(cx, obj, "prototype", &desc)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
@ -1715,7 +1715,7 @@ ResolvePrototype(nsIXPConnect *aXPConnect, nsGlobalWindow *aWin, JSContext *cx,
|
||||
const nsGlobalNameStruct *name_struct,
|
||||
nsScriptNameSpaceManager *nameSpaceManager,
|
||||
JSObject* aDot_prototype,
|
||||
JS::MutableHandle<JSPropertyDescriptor> ctorDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> ctorDesc)
|
||||
{
|
||||
JS::Rooted<JSObject*> dot_prototype(cx, aDot_prototype);
|
||||
NS_ASSERTION(ci_data ||
|
||||
@ -1813,7 +1813,7 @@ ResolvePrototype(nsIXPConnect *aXPConnect, nsGlobalWindow *aWin, JSContext *cx,
|
||||
if (class_parent_name) {
|
||||
JSAutoCompartment ac(cx, winobj);
|
||||
|
||||
JS::Rooted<JSPropertyDescriptor> desc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> desc(cx);
|
||||
if (!JS_GetPropertyDescriptor(cx, winobj, CutPrefix(class_parent_name), &desc)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
@ -1900,7 +1900,7 @@ OldBindingConstructorEnabled(const nsGlobalNameStruct *aStruct,
|
||||
static nsresult
|
||||
LookupComponentsShim(JSContext *cx, JS::Handle<JSObject*> global,
|
||||
nsPIDOMWindow *win,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc);
|
||||
|
||||
// static
|
||||
bool
|
||||
@ -1937,7 +1937,7 @@ static const JSClass ControllersShimClass = {
|
||||
nsresult
|
||||
nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc)
|
||||
{
|
||||
if (id == XPCJSRuntime::Get()->GetStringID(XPCJSRuntime::IDX_COMPONENTS)) {
|
||||
return LookupComponentsShim(cx, obj, aWin, desc);
|
||||
@ -2037,7 +2037,7 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
|
||||
//
|
||||
// Unfortunately, there's a bit of an impedance-mismatch between the Xray
|
||||
// and non-Xray machinery. The Xray machinery wants an API that returns a
|
||||
// JSPropertyDescriptor, so that the resolve hook doesn't have to get
|
||||
// JS::PropertyDescriptor, so that the resolve hook doesn't have to get
|
||||
// snared up with trying to define a property on the Xray holder. At the
|
||||
// same time, the DefineInterface callbacks are set up to define things
|
||||
// directly on the global. And re-jiggering them to return property
|
||||
@ -2046,7 +2046,7 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
|
||||
//
|
||||
// So the setup is as-follows:
|
||||
//
|
||||
// * The resolve function takes a JSPropertyDescriptor, but in the
|
||||
// * The resolve function takes a JS::PropertyDescriptor, but in the
|
||||
// non-Xray case, callees may define things directly on the global, and
|
||||
// set the value on the property descriptor to |undefined| to indicate
|
||||
// that there's nothing more for the caller to do. We assert against
|
||||
@ -2300,7 +2300,7 @@ const InterfaceShimEntry kInterfaceShimMap[] =
|
||||
static nsresult
|
||||
LookupComponentsShim(JSContext *cx, JS::Handle<JSObject*> global,
|
||||
nsPIDOMWindow *win,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc)
|
||||
{
|
||||
// Keep track of how often this happens.
|
||||
Telemetry::Accumulate(Telemetry::COMPONENTS_SHIM_ACCESSED_BY_CONTENT, true);
|
||||
|
@ -223,7 +223,7 @@ class nsWindowSH
|
||||
protected:
|
||||
static nsresult GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc);
|
||||
|
||||
friend class nsGlobalWindow;
|
||||
public:
|
||||
|
@ -6093,8 +6093,8 @@ nsDocument::RegisterElement(JSContext* aCx, const nsAString& aType,
|
||||
return;
|
||||
}
|
||||
|
||||
JS::Rooted<JSPropertyDescriptor> descRoot(aCx);
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc(&descRoot);
|
||||
JS::Rooted<JS::PropertyDescriptor> descRoot(aCx);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc(&descRoot);
|
||||
// This check may go through a wrapper, but as we checked above
|
||||
// it should be transparent or an xray. This should be fine for now,
|
||||
// until the spec is sorted out.
|
||||
|
@ -650,12 +650,12 @@ public:
|
||||
virtual bool getOwnPropertyDescriptor(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc)
|
||||
const override;
|
||||
virtual bool defineProperty(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
JS::Handle<JSPropertyDescriptor> desc,
|
||||
JS::Handle<JS::PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult &result) const override;
|
||||
virtual bool ownPropertyKeys(JSContext *cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
@ -685,7 +685,7 @@ public:
|
||||
virtual bool getPropertyDescriptor(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc)
|
||||
const override;
|
||||
virtual bool hasOwn(JSContext *cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id, bool *bp) const override;
|
||||
@ -774,7 +774,7 @@ bool
|
||||
nsOuterWindowProxy::getPropertyDescriptor(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc) const
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc) const
|
||||
{
|
||||
// The only thing we can do differently from js::Wrapper is shadow stuff with
|
||||
// our indexed properties, so we can just try getOwnPropertyDescriptor and if
|
||||
@ -795,7 +795,7 @@ bool
|
||||
nsOuterWindowProxy::getOwnPropertyDescriptor(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc)
|
||||
const
|
||||
{
|
||||
bool found;
|
||||
@ -818,7 +818,7 @@ bool
|
||||
nsOuterWindowProxy::defineProperty(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
JS::Handle<JSPropertyDescriptor> desc,
|
||||
JS::Handle<JS::PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult &result) const
|
||||
{
|
||||
int32_t index = GetArrayIndexFromId(cx, id);
|
||||
@ -4196,7 +4196,7 @@ nsGlobalWindow::GetSupportedNames(nsTArray<nsString>& aNames)
|
||||
bool
|
||||
nsGlobalWindow::DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObj,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
{
|
||||
MOZ_ASSERT(IsInnerWindow());
|
||||
|
||||
|
@ -496,7 +496,7 @@ public:
|
||||
|
||||
bool DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObj,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc);
|
||||
// The return value is whether DoResolve might end up resolving the given id.
|
||||
// If in doubt, return true.
|
||||
static bool MayResolve(jsid aId);
|
||||
|
@ -3699,7 +3699,7 @@ nsObjectLoadingContent::TeardownProtoChain()
|
||||
bool
|
||||
nsObjectLoadingContent::DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObject,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
{
|
||||
// We don't resolve anything; we just try to make sure we're instantiated.
|
||||
// This purposefully does not fire for chrome/xray resolves, see bug 967694
|
||||
|
@ -168,7 +168,7 @@ class nsObjectLoadingContent : public nsImageLoadingContent
|
||||
// Helper for WebIDL NeedResolve
|
||||
bool DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObject,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc);
|
||||
// The return value is whether DoResolve might end up resolving the given
|
||||
// id. If in doubt, return true.
|
||||
static bool MayResolve(jsid aId);
|
||||
|
@ -1171,7 +1171,8 @@ static bool
|
||||
XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
const Prefable<const JSPropertySpec>* attributes, jsid* attributeIds,
|
||||
const JSPropertySpec* attributeSpecs, JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
const JSPropertySpec* attributeSpecs,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
bool& cacheOnHolder)
|
||||
{
|
||||
for (; attributes->specs; ++attributes) {
|
||||
@ -1221,7 +1222,7 @@ XrayResolveMethod(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
const Prefable<const JSFunctionSpec>* methods,
|
||||
jsid* methodIds,
|
||||
const JSFunctionSpec* methodSpecs,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
bool& cacheOnHolder)
|
||||
{
|
||||
const Prefable<const JSFunctionSpec>* method;
|
||||
@ -1272,7 +1273,7 @@ XrayResolveMethod(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
static bool
|
||||
XrayResolveUnforgeableProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
bool& cacheOnHolder,
|
||||
const NativeProperties* nativeProperties)
|
||||
{
|
||||
@ -1314,7 +1315,7 @@ XrayResolveUnforgeableProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
static bool
|
||||
XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
bool& cacheOnHolder, DOMObjectType type,
|
||||
const NativeProperties* nativeProperties)
|
||||
{
|
||||
@ -1405,7 +1406,7 @@ static bool
|
||||
ResolvePrototypeOrConstructor(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj,
|
||||
size_t protoAndIfaceCacheIndex, unsigned attrs,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
bool& cacheOnHolder)
|
||||
{
|
||||
JS::Rooted<JSObject*> global(cx, js::GetGlobalForObjectCrossCompartment(obj));
|
||||
@ -1445,7 +1446,7 @@ DEBUG_CheckXBLCallable(JSContext *cx, JSObject *obj)
|
||||
}
|
||||
|
||||
static void
|
||||
DEBUG_CheckXBLLookup(JSContext *cx, JSPropertyDescriptor *desc)
|
||||
DEBUG_CheckXBLLookup(JSContext *cx, JS::PropertyDescriptor *desc)
|
||||
{
|
||||
if (!desc->obj)
|
||||
return;
|
||||
@ -1469,7 +1470,7 @@ DEBUG_CheckXBLLookup(JSContext *cx, JSPropertyDescriptor *desc)
|
||||
/* static */ bool
|
||||
XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
bool& cacheOnHolder)
|
||||
{
|
||||
cacheOnHolder = false;
|
||||
@ -1599,7 +1600,7 @@ XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
bool
|
||||
XrayDefineProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::Handle<JSPropertyDescriptor> desc,
|
||||
JS::Handle<JS::PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult &result, bool *defined)
|
||||
{
|
||||
if (!js::IsProxy(obj))
|
||||
|
@ -2417,7 +2417,7 @@ bool
|
||||
XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
bool& cacheOnHolder);
|
||||
|
||||
/**
|
||||
@ -2434,7 +2434,7 @@ XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
bool
|
||||
XrayDefineProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::Handle<JSPropertyDescriptor> desc,
|
||||
JS::Handle<JS::PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult &result,
|
||||
bool *defined);
|
||||
|
||||
|
@ -8299,7 +8299,7 @@ class CGResolveHook(CGAbstractClassHook):
|
||||
|
||||
def generate_code(self):
|
||||
return dedent("""
|
||||
JS::Rooted<JSPropertyDescriptor> desc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> desc(cx);
|
||||
if (!self->DoResolve(cx, obj, id, &desc)) {
|
||||
return false;
|
||||
}
|
||||
@ -10365,7 +10365,7 @@ class CGResolveOwnProperty(CGAbstractStaticMethod):
|
||||
Argument('JS::Handle<JSObject*>', 'wrapper'),
|
||||
Argument('JS::Handle<JSObject*>', 'obj'),
|
||||
Argument('JS::Handle<jsid>', 'id'),
|
||||
Argument('JS::MutableHandle<JSPropertyDescriptor>', 'desc'),
|
||||
Argument('JS::MutableHandle<JS::PropertyDescriptor>', 'desc'),
|
||||
]
|
||||
CGAbstractStaticMethod.__init__(self, descriptor, "ResolveOwnProperty",
|
||||
"bool", args)
|
||||
@ -10384,7 +10384,7 @@ class CGResolveOwnPropertyViaResolve(CGAbstractBindingMethod):
|
||||
Argument('JS::Handle<JSObject*>', 'wrapper'),
|
||||
Argument('JS::Handle<JSObject*>', 'obj'),
|
||||
Argument('JS::Handle<jsid>', 'id'),
|
||||
Argument('JS::MutableHandle<JSPropertyDescriptor>', 'desc')]
|
||||
Argument('JS::MutableHandle<JS::PropertyDescriptor>', 'desc')]
|
||||
CGAbstractBindingMethod.__init__(self, descriptor,
|
||||
"ResolveOwnPropertyViaResolve",
|
||||
args, getThisObj="",
|
||||
@ -10400,7 +10400,7 @@ class CGResolveOwnPropertyViaResolve(CGAbstractBindingMethod):
|
||||
// to avoid re-resolving the properties if someone deletes
|
||||
// them.
|
||||
JSAutoCompartment ac(cx, obj);
|
||||
JS::Rooted<JSPropertyDescriptor> objDesc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> objDesc(cx);
|
||||
if (!self->DoResolve(cx, obj, id, &objDesc)) {
|
||||
return false;
|
||||
}
|
||||
@ -10836,7 +10836,7 @@ class CGDOMJSProxyHandler_getOwnPropDescriptor(ClassMethod):
|
||||
Argument('JS::Handle<JSObject*>', 'proxy'),
|
||||
Argument('JS::Handle<jsid>', 'id'),
|
||||
Argument('bool', 'ignoreNamedProps'),
|
||||
Argument('JS::MutableHandle<JSPropertyDescriptor>', 'desc')]
|
||||
Argument('JS::MutableHandle<JS::PropertyDescriptor>', 'desc')]
|
||||
ClassMethod.__init__(self, "getOwnPropDescriptor", "bool", args,
|
||||
virtual=True, override=True, const=True)
|
||||
self.descriptor = descriptor
|
||||
@ -10952,7 +10952,7 @@ class CGDOMJSProxyHandler_defineProperty(ClassMethod):
|
||||
args = [Argument('JSContext*', 'cx'),
|
||||
Argument('JS::Handle<JSObject*>', 'proxy'),
|
||||
Argument('JS::Handle<jsid>', 'id'),
|
||||
Argument('JS::Handle<JSPropertyDescriptor>', 'desc'),
|
||||
Argument('JS::Handle<JS::PropertyDescriptor>', 'desc'),
|
||||
Argument('JS::ObjectOpResult&', 'opresult'),
|
||||
Argument('bool*', 'defined')]
|
||||
ClassMethod.__init__(self, "defineProperty", "bool", args, virtual=True, override=True, const=True)
|
||||
|
@ -32,7 +32,7 @@ namespace dom {
|
||||
typedef bool
|
||||
(* ResolveOwnProperty)(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc);
|
||||
|
||||
typedef bool
|
||||
(* EnumerateOwnProperties)(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
|
@ -162,7 +162,7 @@ bool
|
||||
BaseDOMProxyHandler::getOwnPropertyDescriptor(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
MutableHandle<JSPropertyDescriptor> desc) const
|
||||
MutableHandle<PropertyDescriptor> desc) const
|
||||
{
|
||||
return getOwnPropDescriptor(cx, proxy, id, /* ignoreNamedProps = */ false,
|
||||
desc);
|
||||
@ -170,7 +170,7 @@ BaseDOMProxyHandler::getOwnPropertyDescriptor(JSContext* cx,
|
||||
|
||||
bool
|
||||
DOMProxyHandler::defineProperty(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
|
||||
Handle<JSPropertyDescriptor> desc,
|
||||
Handle<PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult &result, bool *defined) const
|
||||
{
|
||||
if (desc.hasGetterObject() && desc.setter() == JS_StrictPropertyStub) {
|
||||
@ -210,7 +210,7 @@ DOMProxyHandler::set(JSContext *cx, Handle<JSObject*> proxy, Handle<jsid> id,
|
||||
|
||||
// Make sure to ignore our named properties when checking for own
|
||||
// property descriptors for a set.
|
||||
JS::Rooted<JSPropertyDescriptor> ownDesc(cx);
|
||||
JS::Rooted<PropertyDescriptor> ownDesc(cx);
|
||||
if (!getOwnPropDescriptor(cx, proxy, id, /* ignoreNamedProps = */ true,
|
||||
&ownDesc)) {
|
||||
return false;
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
// other lower-level methods.
|
||||
bool getOwnPropertyDescriptor(JSContext* cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc) const override;
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc) const override;
|
||||
virtual bool ownPropertyKeys(JSContext* cx, JS::Handle<JSObject*> proxy,
|
||||
JS::AutoIdVector &props) const override;
|
||||
|
||||
@ -91,7 +91,7 @@ protected:
|
||||
JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id,
|
||||
bool ignoreNamedProps,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc) const = 0;
|
||||
JS::MutableHandle<JS::PropertyDescriptor> desc) const = 0;
|
||||
};
|
||||
|
||||
class DOMProxyHandler : public BaseDOMProxyHandler
|
||||
@ -102,14 +102,14 @@ public:
|
||||
{}
|
||||
|
||||
bool defineProperty(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
|
||||
JS::Handle<JSPropertyDescriptor> desc,
|
||||
JS::Handle<JS::PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult &result) const override
|
||||
{
|
||||
bool unused;
|
||||
return defineProperty(cx, proxy, id, desc, result, &unused);
|
||||
}
|
||||
virtual bool defineProperty(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
|
||||
JS::Handle<JSPropertyDescriptor> desc,
|
||||
JS::Handle<JS::PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult &result, bool *defined) const;
|
||||
bool delete_(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
|
||||
JS::ObjectOpResult &result) const override;
|
||||
@ -198,7 +198,7 @@ IsArrayIndex(int32_t index)
|
||||
}
|
||||
|
||||
inline void
|
||||
FillPropertyDescriptor(JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
FillPropertyDescriptor(JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
JSObject* obj, bool readonly, bool enumerable = true)
|
||||
{
|
||||
desc.object().set(obj);
|
||||
@ -209,7 +209,7 @@ FillPropertyDescriptor(JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
}
|
||||
|
||||
inline void
|
||||
FillPropertyDescriptor(JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
FillPropertyDescriptor(JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
JSObject* obj, JS::Value v,
|
||||
bool readonly, bool enumerable = true)
|
||||
{
|
||||
@ -218,7 +218,7 @@ FillPropertyDescriptor(JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
}
|
||||
|
||||
inline void
|
||||
FillPropertyDescriptor(JS::MutableHandle<JSPropertyDescriptor> desc,
|
||||
FillPropertyDescriptor(JS::MutableHandle<JS::PropertyDescriptor> desc,
|
||||
JSObject* obj, unsigned attributes, JS::Value v)
|
||||
{
|
||||
desc.object().set(obj);
|
||||
|
@ -872,7 +872,7 @@ GetOrCreateClassObjectMap(JSContext *cx, JS::Handle<JSObject*> scope, const char
|
||||
MOZ_ASSERT(scope == xpc::GetXBLScopeOrGlobal(cx, scope));
|
||||
|
||||
// First, see if the map is already defined.
|
||||
JS::Rooted<JSPropertyDescriptor> desc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> desc(cx);
|
||||
if (!JS_GetOwnPropertyDescriptor(cx, scope, mapName, &desc)) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -1001,7 +1001,7 @@ nsXBLBinding::DoInitJSClass(JSContext *cx,
|
||||
// holder should be class objects. If we don't find the class object, we need
|
||||
// to create and define it.
|
||||
JS::Rooted<JSObject*> proto(cx);
|
||||
JS::Rooted<JSPropertyDescriptor> desc(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> desc(cx);
|
||||
if (!JS_GetOwnUCPropertyDescriptor(cx, holder, aClassName.get(), &desc)) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
@ -1083,7 +1083,7 @@ nsXBLBinding::ResolveAllFields(JSContext *cx, JS::Handle<JSObject*> obj) const
|
||||
|
||||
bool
|
||||
nsXBLBinding::LookupMember(JSContext* aCx, JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc)
|
||||
{
|
||||
// We should never enter this function with a pre-filled property descriptor.
|
||||
MOZ_ASSERT(!aDesc.object());
|
||||
@ -1138,7 +1138,7 @@ nsXBLBinding::LookupMember(JSContext* aCx, JS::Handle<jsid> aId,
|
||||
bool
|
||||
nsXBLBinding::LookupMemberInternal(JSContext* aCx, nsString& aName,
|
||||
JS::Handle<jsid> aNameAsId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc,
|
||||
JS::Handle<JSObject*> aXBLScope)
|
||||
{
|
||||
// First, see if we have an implementation. If we don't, it means that this
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
* otherwise we don't have untainted data with which to do a proper lookup.
|
||||
*/
|
||||
bool LookupMember(JSContext* aCx, JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc);
|
||||
|
||||
/*
|
||||
* Determines whether the binding has a field with the given name.
|
||||
@ -92,7 +92,7 @@ protected:
|
||||
*/
|
||||
bool LookupMemberInternal(JSContext* aCx, nsString& aName,
|
||||
JS::Handle<jsid> aNameAsId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc,
|
||||
JS::Handle<JSObject*> aXBLScope);
|
||||
|
||||
public:
|
||||
|
@ -102,7 +102,7 @@ nsXBLProtoImpl::InstallImplementation(nsXBLPrototypeBinding* aPrototypeBinding,
|
||||
// weird property holder duplication.
|
||||
const char16_t* className = aPrototypeBinding->ClassName().get();
|
||||
JS::Rooted<JSObject*> propertyHolder(cx);
|
||||
JS::Rooted<JSPropertyDescriptor> existingHolder(cx);
|
||||
JS::Rooted<JS::PropertyDescriptor> existingHolder(cx);
|
||||
if (scopeObject != globalObject &&
|
||||
!JS_GetOwnUCPropertyDescriptor(cx, scopeObject, className, &existingHolder)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -271,7 +271,7 @@ nsXBLProtoImpl::CompilePrototypeMembers(nsXBLPrototypeBinding* aBinding)
|
||||
bool
|
||||
nsXBLProtoImpl::LookupMember(JSContext* aCx, nsString& aName,
|
||||
JS::Handle<jsid> aNameAsId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc,
|
||||
JS::Handle<JSObject*> aClassObject)
|
||||
{
|
||||
for (nsXBLProtoImplMember* m = mMembers; m; m = m->GetNext()) {
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
nsresult CompilePrototypeMembers(nsXBLPrototypeBinding* aBinding);
|
||||
|
||||
bool LookupMember(JSContext* aCx, nsString& aName, JS::Handle<jsid> aNameAsId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc,
|
||||
JS::Handle<JSObject*> aClassObject);
|
||||
|
||||
void SetMemberList(nsXBLProtoImplMember* aMemberList)
|
||||
|
@ -822,7 +822,7 @@ xpc::SandboxProxyHandler::get(JSContext* cx, JS::Handle<JSObject*> proxy,
|
||||
{
|
||||
// This uses getPropertyDescriptor for backward compatibility with
|
||||
// the old BaseProxyHandler::get implementation.
|
||||
Rooted<JSPropertyDescriptor> desc(cx);
|
||||
Rooted<PropertyDescriptor> desc(cx);
|
||||
if (!getPropertyDescriptor(cx, proxy, id, &desc))
|
||||
return false;
|
||||
desc.assertCompleteIfFound();
|
||||
|
@ -2140,7 +2140,7 @@ XrayWrapper<Base, Traits>::get(JSContext* cx, HandleObject wrapper,
|
||||
|
||||
// This uses getPropertyDescriptor for backward compatibility with
|
||||
// the old BaseProxyHandler::get implementation.
|
||||
Rooted<JSPropertyDescriptor> desc(cx);
|
||||
Rooted<PropertyDescriptor> desc(cx);
|
||||
if (!getPropertyDescriptor(cx, wrapper, id, &desc))
|
||||
return false;
|
||||
desc.assertCompleteIfFound();
|
||||
|
Loading…
Reference in New Issue
Block a user