Closed
Bug 179068
Opened 22 years ago
Closed 22 years ago
String literals in Rhino are limited to 64K
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
1.5R4
People
(Reporter: user, Assigned: norrisboyd)
Details
Attachments
(2 files)
615 bytes,
text/html
|
Details | |
13.18 KB,
patch
|
Details | Diff | Splinter Review |
Currently Rhino does not support long string literals with more then 64K of characters, which can be a problem to run it against automatically generated scripts.
Reporter | ||
Comment 1•22 years ago
|
||
Test that the interpreter can handle string literals exceeding 64K limit. For that the script passes to eval "str ='LONG_STRING_LITERAL';" where LONG_STRING_LITERAL is a string with 200K chars.
Reporter | ||
Comment 2•22 years ago
|
||
The current 64K limit comes from omj/Parser.java where it constructs the internal script presentation for future decompilation. The patch extends this form to allow string sequences with more then 64K characters and modifes decompilation code in omj/NativeFunction.java accordingly.
Reporter | ||
Comment 3•22 years ago
|
||
Note that the above patch does not extend support for extremely long strings to the compiler mode due to 64K limit on string in Java classfile format, but at least with interpreter mode a Java-based browser can support a generate HTML containing <script> ... document.write('HTML CODE WITH MORE THEN 64K CHARACTERS'); ... </script>
Comment 4•22 years ago
|
||
Testcase added to JS testsuite: mozilla/js/tests/js1_5/String/regress-179068.js
Reporter | ||
Comment 5•22 years ago
|
||
I commited the fix
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 6•22 years ago
|
||
Marking Verified FIXED. The above testcase used to fail in Rhino; now it passes in both compiled and interpreted mode on WinNT -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•