Note: There are a few cases of duplicates in user autocompletion which are being worked on.

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

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
--
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gkw, Assigned: Benjamin)

Tracking

(Blocks: 1 bug, {assertion, regression, testcase})

Trunk
mozilla17
x86_64
Mac OS X
assertion, regression, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
Created attachment 644717 [details]
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] == '(',
(Reporter)

Comment 1

5 years ago
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: 761723
(Assignee)

Comment 2

5 years ago
What do people think toSource() of a generator expression should be?
(Assignee)

Updated

5 years ago
Duplicate of this bug: 776315
(Assignee)

Comment 4

5 years ago
Created attachment 645168 [details] [diff] [review]
add an generator expression flag to scripts
Assignee: general → bpeterson
Attachment #645168 - Flags: review?(n.nethercote)
(Assignee)

Comment 5

5 years ago
Created attachment 645169 [details] [diff] [review]
stub out genexp toSource calls
Attachment #645169 - Flags: review?(n.nethercote)
(Assignee)

Updated

5 years ago
Attachment #645168 - Flags: review?(n.nethercote) → review?(luke)
(Assignee)

Updated

5 years ago
Attachment #645169 - Flags: review?(n.nethercote) → review?(luke)
Whiteboard: [js:t]

Updated

5 years ago
Attachment #645168 - Flags: review?(luke) → review+

Comment 6

5 years ago
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+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f939ff2f29fb
https://hg.mozilla.org/integration/mozilla-inbound/rev/08c6cc749ee6

Comment 8

5 years ago
https://hg.mozilla.org/mozilla-central/rev/f939ff2f29fb
https://hg.mozilla.org/mozilla-central/rev/08c6cc749ee6
Status: NEW → RESOLVED
Last Resolved: 5 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.