This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 154179 - Changing object accessors causes errors in JavaScript
Summary: Changing object accessors causes errors in JavaScript
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
: 151366 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-30 22:13 UTC by brettz9
Modified: 2009-03-16 16:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brettz9 2008-11-30 22:13:13 UTC
There has been apparently a major regression in 6.5 regarding JavaScript processing (in a JavaScript file), at least
with E4X:

In just typing the following into a file, it seems to work

function a() {
    alert(s.a);
}

But if you accidentally hit return after the ".", and then do an 'undo' (or otherwise delete the whitespace just added),
a red exclamation mark appears indicating an error, where there is no error (nor was there any error caused by adding
the whitespace).

This problem does not occur in 6.0.

Similar problems occur if you start with this valid code:

function a() {
   alert(s.
          a);
}
and then collapse the whitespace.

Due to this problem, I am still running 6.0
Comment 1 Torbjorn Norbye 2008-12-01 01:20:11 UTC
This is unrelated to E4X; this was a bug in incremental parsing, introduced in 6.5 for performance reasons. (I hope you meant you were using 6.1 instead 
of 6.0 since the 6.1 JavaScript support should be quite a bit better than in 6.0).

A workaround is to modify any line outside the current function.

I've fixed this in changeset 78dd0b148881. Regression test is JsParserTest.testIncremental7.

I'm going to nominate this for a 6.5 patch; QE can you verify the fix in the trunk? Build 4455 or later from
   http://deadlock.netbeans.org/hudson/job/trunk/

Fixed in 7.0M1.

Comment 2 brettz9 2008-12-01 04:33:04 UTC
Yes, sorry, I forgot to change that part of my post, that it was not only for E4X. 

And yes, sorry, I was using 6.1 (Early Access PHP).
Comment 3 Torbjorn Norbye 2008-12-10 15:46:42 UTC
*** Issue 151366 has been marked as a duplicate of this issue. ***
Comment 4 pgebauer 2009-01-14 09:50:52 UTC
The issue hasn't passed the nomination process for 65patch2 by cut-off date. It has been moved to 65patch3.
Comment 5 Martin Schovanek 2009-02-27 08:07:22 UTC
v.
Comment 6 Erno Mononen 2009-03-02 15:55:50 UTC
Transplanted to release65_fixes: http://hg.netbeans.org/release65_fixes/rev/122da9a771bd