Closed Bug 752737 Opened 8 years ago Closed 8 years ago

Delete the default/copy constructors and assignment operator from JSString, JSObject

Categories

(Core :: JavaScript Engine, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
Now that NewObjectCache doesn't embed a JSObject_Slots16 instance that needs a constructor on JSObject, this is easy for that case.  JSString is nearly as easy, just one test to fix up (in the manner that test's object-inspecting code already does).

Note that because these deletions inherit, we can get rid of deletions in all subclasses and still get errors on misuse.  Derived classes could implement these bits, to be sure, but that requires enough effort that I'm not too worried about it.  And any documentation value in having these redundantly in derived classes seems negligible -- best just to not have them.
Attachment #621777 - Flags: review?(luke)
Comment on attachment 621777 [details] [diff] [review]
Patch

Yes, please.
Attachment #621777 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/e5f63aa66be6
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.