Closed Bug 892059 Opened 6 years ago Closed 6 years ago

multiple issues with js/src/vm/SelfHosting.cpp:847 (in CloneValue)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: keeler, Assigned: till)

Details

Attachments

(1 file)

847             printf("Error: Can't yet clone value: %s\n", JS_EncodeString(cx, valSrc));

This line originally came to my attention because it is my understanding that this call to JS_EncodeString leaks (the memory returned must be JS_free'd). Also, Jim tells me that printf is not the correct way to report this error.
We should be able to clone all values, now. And if not, printing a puny warning to stdout might not be the best course of action, really.
Attachment #773976 - Flags: review?(jimb)
Assignee: general → till
Comment on attachment 773976 [details] [diff] [review]
Assert on unclonable values in self-hosting CloneValue.

Review of attachment 773976 [details] [diff] [review]:
-----------------------------------------------------------------

Definitely.
Attachment #773976 - Flags: review?(jimb) → review+
https://hg.mozilla.org/mozilla-central/rev/d5cab52418df
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.