Open Bug 992977 Opened 10 years ago Updated 2 years ago

JS_DefineProperties incorrectly equates the absence of JSPROP_NATIVE_ACCESSORS with selfHosting

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: bholley, Unassigned)

Details

See http://mxr.mozilla.org/mozilla-central/source/js/src/jsapi.cpp#3196

JSPROP_NATIVE_ACCESSORS has historically meant that that the accessors are JSNatives, not JSPropertyOps. So If anyone was using JS_DefineProperties these days for JSPropertyOp-backed properties (which they apparently aren't), they'd hit the self-hosting branch and assert.

So, do we want to go fix this? Or do we want to just declare victory and change the JSPropertySpec format to take JSNatives directly?
Flags: needinfo?(jorendorff)
Looks like Nathan introduced this in bug 958262.
And bug 958262 comment 8 implies that till was even aware of this?
Flags: needinfo?(till)
(In reply to Bobby Holley (:bholley) from comment #0)
> So, do we want to go fix this? Or do we want to just declare victory and
> change the JSPropertySpec format to take JSNatives directly?

Uh... Declare victory, for sure. Is it really true no one is using that anymore? This seems too good to be true.
Flags: needinfo?(jorendorff)
Urgh, I somehow missed this needinfo :(

And yes, declare victory, definitely. I don't know why I didn't see that this means that we can get rid of even more stuff, but it's very nice.
Flags: needinfo?(till)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.