Closed Bug 616663 Opened 14 years ago Closed 14 years ago

Creating a new Option using 'new Option' in a sandbox throws NS_ERROR_OUT_OF_MEMORY.

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 616397

People

(Reporter: greg.parris, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101203 Firefox/4.0b8pre Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101203 Firefox/4.0b8pre ID:20101203030309 Noticed this when a person reported a broken user script with Scriptish. If an Option is created in a sandbox via "new Option", NS_ERROR_OUT_OF_MEMORY is thrown. This does not happen when an option is created in the sandbox using "createElement", or if the JS is actually in the page (i.e. <script>). Reproducible: Always Steps to Reproduce: 1. Grab Anthony Lieuallen's minimal add-on from https://bugzilla.mozilla.org/show_bug.cgi?id=612025 2. Modify content/browser.js to evaluate "var myOpt = new Option('opt1');" in the sandbox 3. Install the add-on 4. Load http://www.google.com 5. Observe NS_ERROR_OUT_OF_MEMORY is thrown Actual Results: Add-on fails with: Error: uncaught exception: [Exception... "Out of Memory" nsresult: "0x8007000e (NS_ERROR_OUT_OF_MEMORY)" location: "JS frame :: chrome://greasemonkey/content/browser.js :: <TOP_LEVEL> :: line 17" data: no] Expected Results: New <option> element is created. The Scriptish issue: https://github.com/erikvold/scriptish/issues/issue/128
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.