We want to remove the getProperty/setProperty ClassOps, see bug 1389510. XPConnect classes use the setProperty hook as follows (if XPC_SCRIPTABLE_WANT_SETPROPERTY is not set): (1) If XPC_SCRIPTABLE_USE_JSSTUB_FOR_SETPROPERTY is used, the setProperty hook is nullptr (DOM_BASE_SCRIPTABLE_FLAGS sets this flag). (2) Else, we use a hook that throws an exception (XPC_WN_MaybeResolvingSetPropertyStub or XPC_WN_CannotModifySetPropertyStub). The question is if (2) is necessary. bz said (bug 1389510 comment 3): > I'm not entirely sure whether we need these. We have these things like that > for addProperty already, which should cover the cases we really care about > here, I think. In particular, all consumers of > XPC_SCRIPTABLE_USE_JSSTUB_FOR_ADDPROPERTY also use > XPC_SCRIPTABLE_USE_JSSTUB_FOR_SETPROPERTY, so we can't have a case where > addProperty is nullptr but setProperty needs to be one of those stubs.... > I'm pretty sure we could just require that pattern and nuke these stubs, but > it might be worth double-checking with bholley or peterv in case I missed > something. I did a Try push that uses a nullptr setProperty hook instead of (2) and it's green.
Attachment #8897006 - Flags: review?(peterv)
Comment on attachment 8897006 [details] [diff] [review] Patch Stealing this review -- we don't need the setProperty hook because of the addProperty hook.
Attachment #8897006 - Flags: review?(peterv) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4ed300523cb0 Remove throw-on-set setProperty hooks on WrappedNatives. r=mrbkap
You need to log in before you can comment on or make changes to this bug.