зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1414461. Make sure we always null-check the result of XrayTraits::EnsureHolder. r=mccr8
MozReview-Commit-ID: IV2L0f2612D
This commit is contained in:
Родитель
37836d94c0
Коммит
91cf28ede5
|
@ -716,6 +716,8 @@ bool
|
|||
JSXrayTraits::delete_(JSContext* cx, HandleObject wrapper, HandleId id, ObjectOpResult& result)
|
||||
{
|
||||
RootedObject holder(cx, ensureHolder(cx, wrapper));
|
||||
if (!holder)
|
||||
return false;
|
||||
|
||||
// If we're using Object Xrays, we allow callers to attempt to delete any
|
||||
// property from the underlying object that they are able to resolve. Note
|
||||
|
@ -954,6 +956,9 @@ JSXrayTraits::construct(JSContext* cx, HandleObject wrapper,
|
|||
{
|
||||
JSXrayTraits& self = JSXrayTraits::singleton;
|
||||
JS::RootedObject holder(cx, self.ensureHolder(cx, wrapper));
|
||||
if (!holder)
|
||||
return false;
|
||||
|
||||
if (self.getProtoKey(holder) == JSProto_Function) {
|
||||
JSProtoKey standardConstructor = constructorFor(holder);
|
||||
if (standardConstructor == JSProto_Null)
|
||||
|
|
Загрузка…
Ссылка в новой задаче