Closed Bug 84953 Opened 23 years ago Closed 23 years ago

Crash: referenced function call

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

()

VERIFIED DUPLICATE of bug 63930

People

(Reporter: unreal, Assigned: jst)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9) Gecko/20010505
BuildID:    2001050515

Bad: This page CRASHES Mozilla. Works in IE5.

Reproducible: Always
Steps to Reproduce:
1. Create a layer named "Layer1"
2. call following in JavaScript:

2a) 
{
    alert( document.getElementById );
}

2b) 
{
alert( document.getElementById('Layer1'));
}

2c) 
{var gbId = document.getElementById;
alert( gbId );
alert( gbId('Layer1') );
}


Actual Results:  2a) shows alert dialog saying object is a function
2b) shows alert dialog saying [object]
2c) shows alert dialog saying object is a function
    THEN
    *CRASHES* with no informations

Expected Results:  step 2c) should display steps 2a + 2c combined.
so it should display an information that "gbId" is a function and then show
alert box saying return value is an [object]

var gbId = document.getElementById;

should return a reference to a function, and it seems to do so. 
typing document.getElementById('idhere') works, but when called thru gbId with
an argument, it crashes. same thing with all other functions. this certainly
works 100% well in Internet Explorer 5.
Hi Wojtek, could you test this bug with Mozilla0.9.1? A lot of bugs (specially
crashes) have been fixed since 0.9. It doesn't crash and works correctly for me
in build 2001060308 win2k.
Thanks alot for helping test Mozilla!
Summary: Crash: referenced function call → Crash: referenced function call
Fixed, see bug 63930 for more details.

*** This bug has been marked as a duplicate of 63930 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified on build 06-21-11.0.9.1 on Windows2000...
does not show the second alert and did not crash

javascript console shows his error....
Error: uncaught exception: [Exception... "Illegal operation on WrappedNative
prototype object"  nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" 
location: "JS frame :: file:///c|/kiran/test/84953.html :: <TOP_LEVEL> :: line
9"  data: no]
Status: RESOLVED → VERIFIED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.