Bug 13815 - bad parsing of JavaScript code from big and complex external .js
Summary: bad parsing of JavaScript code from big and complex external .js
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.formfaces.com/faces/Exampl...
Depends on: 4045
  Show dependency treegraph
Reported: 2007-05-22 10:01 PDT by Luigi Giannini
Modified: 2011-08-12 13:10 PDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Luigi Giannini 2007-05-22 10:01:10 PDT
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:

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)
Comment 1 David Kilzer (:ddkilzer) 2007-05-22 10:15:08 PDT
(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).

Comment 2 Luigi Giannini 2007-05-29 03:25:18 PDT
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:
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 ...

Comment 3 David Kilzer (:ddkilzer) 2007-08-20 21:30:34 PDT
(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!
> Stack trace:
> (stack trace not available)

And this test now fails with a JavaScript error:


SyntaxError: Parse error
Line: 1

Almost there!

Comment 4 Oliver Hunt 2008-07-19 23:39:33 PDT
That last example doesn't seem to trigger an exception in ToT
Comment 5 Gavin Barraclough 2011-08-12 13:10:41 PDT
http://www.formfaces.com/ seems to no longer exist. :-(