Bug 13815
Summary: | bad parsing of JavaScript code from big and complex external .js | ||
---|---|---|---|
Product: | WebKit | Reporter: | Luigi Giannini <luigi.giannini> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | barraclough, ddkilzer |
Priority: | P2 | ||
Version: | 523.x (Safari 3) | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | http://www.formfaces.com/faces/Examples/Bookstore/index.html | ||
Bug Depends on: | 4045 | ||
Bug Blocks: |
Luigi Giannini
FormFaces is a ZERO server-side processing and ZERO plug-ins XForm implementation in pure JavaScript. FormFaces is freely licensed under the BSD.
While WebKit has not support for XForm directly or via a plug-in (may be in a far long time distance?) this is the only way to work with XFrom on WebKit based browser.
The URL above is for access a demo of a bookstore full XForm based that work on Firefox 2.x on Mac and Win and IE 6.x and 7 on Win.
On that site there's a full suite (32) for test at this URL: http://www.formfaces.com/faces/Examples/Test%20Pages/index.html
I have spent time to run every test on WebKit 522+: all pass except these:
http://www.formfaces.com/faces/Examples/Test%20Pages/itemset.html
http://www.formfaces.com/faces/Examples/Test%20Pages/submit.html
http://www.formfaces.com/faces/Examples/Test%20Pages/replace-all.html
These tests all pass on FireFox 2.x on Mac and Opera 9.21 on Mac while on WebKit 522+ return Syntax Error.
Then this is a bug relative to parsing Javascript from external .js ???
(I try to read the external .js that implement XForm but is very hard because is a one line code of 96Kbyte)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
(In reply to comment #0)
> http://www.formfaces.com/faces/Examples/Test%20Pages/itemset.html
> http://www.formfaces.com/faces/Examples/Test%20Pages/submit.html
> http://www.formfaces.com/faces/Examples/Test%20Pages/replace-all.html
Every one of these tests ends with an alert sheet which says (among other things):
"Maximum call stack size exceeded."
Related to Bug 4045?
Confirmed with a local debug build of WebKit r21639 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).
Luigi Giannini
Thanks David for your fast reply.
Today I can respond to Your last question: "Related to Bug 4045?": Yes it is related but not duplicated.
After dowload the latest nightly build of webkit I change the source code of JavaScriptCore/kjs/object.cpp according to the naive fix shown in Bug 4045. (I only comment the code that change JavaScript call stack in accordance with platform leaving always KJS_MAX_STACK 1000 !) and the error alert sheets that report: "Maximum call stack size exceeded" are disappeared.
Two of test now pass:
http://www.formfaces.com/faces/Examples/Test%20Pages/itemset.html
http://www.formfaces.com/faces/Examples/Test%20Pages/submit.html
But the third no. Now it's stopped by this error: "NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7"
OK is a step ahead but I wonder of these things:
Why would the WebKit has a different behavior on different platform?
Why isn't the bug 4045 fixed if there is a fix? Too simple to pass in the main tree code?
Now is sure that bug 4045 blocks two others bugs: 6628 and 13815.
Please fix asap ...
Thanks
David Kilzer (:ddkilzer)
(In reply to comment #1)
> (In reply to comment #0)
> > http://www.formfaces.com/faces/Examples/Test%20Pages/itemset.html
> > http://www.formfaces.com/faces/Examples/Test%20Pages/submit.html
These are now fixed after fixing Bug 4045!
> > http://www.formfaces.com/faces/Examples/Test%20Pages/replace-all.html
This page now fails with the following alert() dialog:
> An error has occurred!
>
> Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
>
> Stack trace:
> (stack trace not available)
And this test now fails with a JavaScript error:
http://www.formfaces.com/faces/Examples/Test%20Pages/controls-labels.html
SyntaxError: Parse error
http://www.formfaces.com/faces/Source/xforms.js
Line: 1
Almost there!
Oliver Hunt
That last example doesn't seem to trigger an exception in ToT
Gavin Barraclough
http://www.formfaces.com/ seems to no longer exist. :-(