Closed Bug 1136523 Opened 5 years ago Closed 5 years ago

Stop using JS_DeprecatedNewObjectWithGivenProtoAndParent in ctypes code

Categories

(Core :: js-ctypes, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

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+
https://hg.mozilla.org/mozilla-central/rev/fb067573f99d
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.