Bug 1065507, part 3 - Remove special support for js_GetterOnlyPropertyStub from js/ipc.

--HG--
extra : rebase_source : cc10de476c7c40324f9ae781c6e06500a53edb1b
This commit is contained in:
Jason Orendorff 2014-09-10 12:54:20 -05:00
parent 4355a2e2bb
commit bf1f882acd
2 changed files with 2 additions and 8 deletions

View File

@ -408,8 +408,7 @@ JavaScriptShared::findObjectById(JSContext *cx, uint32_t objId)
}
static const uint64_t DefaultPropertyOp = 1;
static const uint64_t GetterOnlyPropertyStub = 2;
static const uint64_t UnknownPropertyOp = 3;
static const uint64_t UnknownPropertyOp = 2;
bool
JavaScriptShared::fromDescriptor(JSContext *cx, Handle<JSPropertyDescriptor> desc,
@ -449,8 +448,6 @@ JavaScriptShared::fromDescriptor(JSContext *cx, Handle<JSPropertyDescriptor> des
} else {
if (desc.setter() == JS_StrictPropertyStub)
out->setter() = DefaultPropertyOp;
else if (desc.setter() == js_GetterOnlyPropertyStub)
out->setter() = GetterOnlyPropertyStub;
else
out->setter() = UnknownPropertyOp;
}
@ -511,8 +508,6 @@ JavaScriptShared::toDescriptor(JSContext *cx, const PPropertyDescriptor &in,
} else {
if (in.setter().get_uint64_t() == DefaultPropertyOp)
out.setSetter(JS_StrictPropertyStub);
else if (in.setter().get_uint64_t() == GetterOnlyPropertyStub)
out.setSetter(js_GetterOnlyPropertyStub);
else
out.setSetter(UnknownStrictPropertyStub);
}

View File

@ -101,8 +101,7 @@ struct PPropertyDescriptor
//
// 0 - NULL
// 1 - Default getter or setter.
// 2 - js_GetterOnlyPropertyStub (setter only)
// 3 - Unknown
// 2 - Unknown
GetterSetter getter;
GetterSetter setter;
};