Closed Bug 776314 Opened 12 years ago Closed 12 years ago

"Assertion failure: src->length() > 0 && chars[0] == '(',"

Categories

(Core :: JavaScript Engine, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: gkw, Assigned: Benjamin)

References

Details

(Keywords: assertion, regression, testcase, Whiteboard: [js:t])

Attachments

(3 files)

Attached file stack
disassemble(eval(("(function(){(a for each (e in b));})")));

asserts js debug shell on m-c changeset defbe00ca091 without any CLI arguments at Assertion failure: src->length() > 0 && chars[0] == '(',
autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   99950:e080642175e6
user:        Benjamin Peterson
date:        Fri Jul 20 20:17:38 2012 +0200
summary:     Bug 761723 - Save script sources to implement Function.prototype.toString. r=jorendorff,njn,jimb,jst,Ms2ger
Blocks: savesource
What do people think toSource() of a generator expression should be?
Assignee: general → bpeterson
Attachment #645168 - Flags: review?(n.nethercote)
Attachment #645169 - Flags: review?(n.nethercote)
Attachment #645168 - Flags: review?(n.nethercote) → review?(luke)
Attachment #645169 - Flags: review?(n.nethercote) → review?(luke)
Whiteboard: [js:t]
Attachment #645168 - Flags: review?(luke) → review+
Comment on attachment 645169 [details] [diff] [review]
stub out genexp toSource calls

>+    if (isInterpreted() && script()->isGeneratorExp) {
>+        if ((!bodyOnly && !out.append("function genexp() {")) ||
>+            !out.append("\n    [generator expression]\n") ||
>+            (!bodyOnly && !out.append("}")))
>+            return NULL;
>+        return out.finishString();

Multi-line conditional needs braced then-branch.
Attachment #645169 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/f939ff2f29fb
https://hg.mozilla.org/mozilla-central/rev/08c6cc749ee6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Automatically extracted testcase for this bug was committed:

https://hg.mozilla.org/mozilla-central/rev/efaf8960a929
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: