Closed Bug 1136523 Opened 5 years ago Closed 5 years ago
Stop using JS
_Deprecated New Object With Given Proto And Parent in ctypes code
I believe ctypes is the only remaining consumer of this function once the xpconnect patches I wrote already land. It's used in the following places: 1) InitCTypeClass. This parents to the thing passed from InitTypeClasses, which is called from JS_InitCTypesClass. The argument is the object with sCTypesGlobalClass as its JSClass (so the thing defined as global.ctypes). 2) InitTypeConstructor for the sCTypeProtoClass. Called from InitTypeClasses. 3) CType::Create, to create typeObj and "prototype" with the same parent as "typeProto" had. 4) CData::Create, to create "dataObj" with the same parent as "typeObj" had. 5) Int64Base::Construct to give it the same parent as "proto" had. OK, so what uses those parents? The only consumers of JS_GetParent and GetObjectParent in js/src/ctypes are the JS_GetParent bits for #3, #4, #5 above. So I bet we can just nix all this junk.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8569168 - Flags: review?(jwalden+bmo) → review+
You need to log in before you can comment on or make changes to this bug.