Closed Bug 207271 Opened 21 years ago Closed 21 years ago

Exception when trying to access property in not yet completely loaded frame

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: info, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507

By accessing a property in a chat output frame which is never 100% loaded I 
get "Error: uncaught exception: Permission denied to get property 
Window.check". Property Window.check is a variable declared in this chat 
output frame: var check = true;
Accessing it by calling alert(parent.chatoutput.check) or just trying to get 
it's type (typeof parent.chatoutput.check) results in an exception. Maybe 
there is another reason for this happening but I am reporting this bug because 
IE (maybe it is not worth to refer to it in this case) is able to handle this 
correctly and I am very sure that there cannot be another reason for it 
because I checked the Java Script Console and there are no more errors than 
this one.

Reproducible: Always

Steps to Reproduce:
1. Creating two frames of which one is always loading.
2. Accessing a property of the second frame (it happens in both cases).
3. Described exception will appear.

Actual Results:  
An exception is displayed:
Error: uncaught exception: Permission denied to get property Window.check

Expected Results:  
Return an "undefined" type and/or value if the frame is not present or return 
the value of the property.
Browser, not engine. Reassigning to DOM Level 0; cc'ing Mitch -
Assignee: rogerl → dom_bugs
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → ashishbhatt
Summary: javascript uncaught exception when trying to access property in not yet completely loaded frame → Exception when trying to access property in not yet completely loaded frame
I have to correct myself. This bug does not depend on the still loading frame, 
it depends on using the same host but a different port. Mozilla restricts 
access to frames which are not the same host. I am using "localhost:80" (Web) 
and "localhost:1983" (Chat Output) so that Mozilla denies permission because 
of the different port but same host. I think this should be changed in advance 
to developers of software of this kind. IE supports same host but different 
ports in this case. Currently I am using a workaround by having the chatserver 
serving the second frame - but so the server lags a litle bit :/. Maybe it is 
not really necessary to restrict access to different ports.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Daniel: perhaps you would be interested in Security bug 163410,
"Security Error: Content at http://{xxx} may not load data from {yyy}."

That sounds similar to the issue you're describing. Perhaps we should
even reopen this bug and assign it to Security for an opinion.

Thoughts?
You need to log in before you can comment on or make changes to this bug.