Attempting to stringify functions containing certain generator statements results in NS_ERROR_OUT_OF_MEMORY

NEW
Unassigned

Status

()

Core
JavaScript Engine
--
major
7 years ago
4 years ago

People

(Reporter: kmag, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

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)

Updated

4 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.