Closed Bug 681495 Opened 13 years ago Closed 5 years ago

Attempting to stringify functions containing certain generator statements results in NS_ERROR_OUT_OF_MEMORY

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
major

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kmag, Unassigned)

Details

(Whiteboard: js-triage-needed)

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
Closed: 5 years ago
Flags: needinfo?(iireland)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.