[SERVER-502] spidermonkey function flags appear to be specified incorrectly Created: 21/Dec/09  Updated: 12/Jul/16  Resolved: 21/Dec/09

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: 1.3.0

Type: Bug Priority: Minor - P4
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It looks like the way our function callback flags are specified in sm is not correct according to the docs. Our callbacks look like this:

JSFunctionSpec internal_cursor_functions[] = {

{ "hasNext" , internal_cursor_hasNext , 0 , 0 , JSPROP_READONLY | JSPROP_PERMANENT }

,

{ "next" , internal_cursor_next , 0 , 0 , JSPROP_READONLY | JSPROP_PERMANENT }

,

{ 0 }

};

And according to the docs the JSPROP flags are supposed to be in the fourth field, not the fifth field.
<https://developer.mozilla.org/En/SpiderMonkey/JSAPI_Reference/JSFunctionSpec>

I'm happy to work on this myself, just wanted to run it by you first.



 Comments   
Comment by auto [ 21/Dec/09 ]

Author:

{'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-502 fix specification of native callback flags in sm
http://github.com/mongodb/mongo/commit/48feb5237fb8159adddb704e8b757a8c6975a62a

Comment by Eliot Horowitz (Inactive) [ 21/Dec/09 ]

go ahead and change
if it passes all the tests probably is fine

Generated at Thu Feb 08 02:54:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.