Script space quota exhausted error when creating a large HTML block with jQuery constructor in Firefox
|Reported by:||elcarpie@…||Owned by:||elcarpie@…|
This bug report is similar to #6796, but in my case I'm passing a text block of HTML to the jQuery function instead of an unsupported XML block. That bug was marked as fixed, but the rather low limit still exists in Firefox.
In my case, I'm using the jstree plugin which is taking a rather large XML document (retrieved from a web service) and using XSLT to turn it to a string containing an HTML nested list, which it then passes to jQuery's constructor to create DOM objects. I get the "stack quota" error in the same RegExp call mentioned in #6796.
In #6796, dmethvin suggested assuming that anything over 1K is HTML. That seems reasonable to me (and works in my use case with a patched jQuery 1.4.4).
To reproduce, open http://jsfiddle.net/6GvyJ/ with Firefox (in my case 3.6.13) with Firebug enabled. The script simply dynamically creates a large string containing the html for an unordered list. I've tweaked the len variable to be right over the edge of Firefox's limit. Set len to 71859 and the script will work.
In Chrome, I was able to set len to several hundred thousand before I started having issues.
Change History (6)
comment:1 Changed 6 years ago by jitter
- Component changed from unfiled to core
- Owner set to elcarpie@…
- Priority changed from undecided to low
- Status changed from new to pending
comment:5 Changed 6 years ago by dmethvin
- Resolution set to fixed
- Status changed from open to closed