Closed Bug 648696 Opened 9 years ago Closed 9 years ago

Error style "object..method()" not detected by the parser and executed


(Core :: JavaScript Engine, defect, major)

Not set





(Reporter: patrick, Unassigned)




(Keywords: testcase)


(1 file)

User-Agent:       Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0) Gecko/20100101 Firefox/4.0

The parser not always detects error type "object..method()". See the source of the http reference for more information (JS comments and line 79).

Reproducible: Always

Steps to Reproduce:
1.use jQuery (Is it required ? I did not check.)
2.enter "e..preventDefault();" in javascript code of an event handler
Actual Results:  
executes the faulty line most of the time.

Expected Results:  
It should not execute!

Note that the message "XML descendants internal method is incompatible Object Called" appeared after loading the home page and did not reappear after restarting Firefox and viewing this page ... This problematic line 67 is initially a typing mistake, of course, done while debugging event handlers using jQuery. At that moment, the jQuery library has functioned as expected when these two points were present! I am strongly convinced that there is something very wrong with the routines dealing with events of Mozilla Firefox, because I always struggled to do my work properly handlers events. tried with:
 Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv: Gecko/20110319 Firefox/3.6.16
 Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0) Gecko/20100101 Firefox/4.0
 running firebug (1.7.0 <- FFv4)
 OpenSUSE 10.3, KDE 3.5.10 "release 55"
 Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20110319 Firefox/3.6.16 (Firebug 1.6.2 deactivated)
 Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0 (Firebug 1.7.0 deactivated)
Attached file Testing HTML sample
Keywords: testcase
Product: Firefox → Core
QA Contact: general → general
You can easily reproduce this by opening up the web console and typing |document..body|.

>[10:54:09.174] > document..body
>[10:54:09.181] TypeError: XML descendants internal method called on incompatible Proxy
Assignee: nobody → general
Component: General → JavaScript Engine
Ever confirmed: true
QA Contact: general → general
I guess that the parsing problem should be resolved fairly quickly. But there is another problem, hidden and more serious than that: the events processing in Firefox. I develop web pages with Firefox + Firebug (+ jQuery?), and so spend hours working with Firefox. Beyond recurrent difficulties to debug event handlers, I regularly have to restart the computer after a few hours because Firefox "freezes" X11/Linux 1-2 seconds every 3-5 seconds (very roughly!).
After experiencing this problem, where my event handling routine was working CORRECTLY with this ".." syntax error, I conclude that the origin is on the events side, delicate interface between Firefox and X11. But I can be totally wrong ... I do not know how to reproduce at every turn this freeze problem, a quarter or a fifth of the time, neither how I could help de debugging team to locate the origine of it.
We try to scope individual bugs to a single issue.  This parsing problem is  reproducible and well-defined, so let's keep it as the focus of this bug.  Would you mind filing a new bug for the problem you were experiencing with the freezing/stuttering, please?
Note that this "parse error" is an e4x feature:
js> var xml = <a><b><c>foo</c><d>bar</d></b></a>
js> xml..d
Yeah, at parse time it's impossible to tell whether ".." is an error in an implementation that supports e4x.  You can only tell at runtime, when you discover that the left-hand side is not an e4x object.
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.