Attempting to stringify functions containing certain generator statements results in NS_ERROR_OUT_OF_MEMORY

RESOLVED WONTFIX

Status

()

--
major
RESOLVED WONTFIX
8 years ago
a month ago

People

(Reporter: kmag, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: js-triage-needed)

(Reporter)

Description

8 years ago
Attempts to stringify the following function result in an OOM error:

   function foo(names) { (name for (name in names)) };

Notably, the following function stringifies fine:

   function foo() { (name for (name in names)) };

Ordinarily, the error causes stack to unwind silently, skipping any error handlers. The error can be seen as follows, though:

   let sandbox = Cu.Sandbox(this, { wantXrays: false });
   sandbox.foo = function foo(names) { (name for (name in names)) };
   Cu.evalInSandbox("String(foo)", sandbox);

I see this problem as of Firefox 7, through the latest m-c nightlies.
Whiteboard: js-triage-needed
Assignee: general → nobody
Iain, is this still an issue?
Flags: needinfo?(iireland)
This isn't even valid Javascript syntax anymore: https://developer.mozilla.org/bm/docs/Web/JavaScript/Reference/Operators/Generator_comprehensions#Differences_to_the_older_JS1.7JS1.8_comprehensions

Closing as ... WONTFIX, I suppose.
Status: NEW → RESOLVED
Last Resolved: a month ago
Flags: needinfo?(iireland)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.