Closed Bug 226193 Opened 21 years ago Closed 13 years ago

Javascript exception when accessing document["config"] or document["domConfig"]

Categories

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

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla6

People

(Reporter: hubert.kauker, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031030
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031030

"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED)
[nsIDOM3Document.config]"

when the following javascript loop is run:

	for( var p in window.document )
	{
		try {
			var v = window.document[p];
		}
		catch(e) { 
			alert ( e.message );
		}
	}

This both happens before and after the onload event of the window.
At the point of exception we have p == "config".




Reproducible: Always

Steps to Reproduce:
1.Include above script fragment into SCRIPT element in HEAD of a document.
2.Optionally enclose the code by window.onload = function() { ... }
3.Load the document.


Actual Results:  
Alert() is shown containing message:

Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED)
[nsIDOM3Document.config]



Expected Results:  
Should have executed the loop without any visible action.
Confirming with Linux Firebird 0.7+
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Summary: Javascript exception when accessing document["config"] → Javascript exception when accessing document["config"] or document["domConfig"]
Comment on attachment 135926 [details]
testcase

This testcase throws error on "config" element in Mozilla Suite and on
"domConfig" element in Firebird
It throws on domConfig on both, actually, if you use a recent suite or
something.  And that's correct -- you are accessing a DOM3 property that is in
fact not implemented....

Is there a reason here to make it not throw?

Anyway, not JS engine; the "Component returned failure code" means it's an error
in the Mozilla code somewhere.
Assignee: general → general
Component: JavaScript Engine → DOM Core
QA Contact: PhilSchwartau → ian
then why it can be iterated with for-in ?
Component: DOM Core → JavaScript Engine
Because it _is_ defined as a property on the nsIDOM3Document interface.  It's
just one that throws if you try to access its getter.

Please do not undo my component changes.  Thank you.
Component: JavaScript Engine → DOM Core
Ouch. Sorry - ctrl+r in Gecko leaves selects in old position.

So what kind of bug is it? 

The goal is to remove not implemented method/property from interface or to
implement it?!?
The goal is to eventually implement this.
*** Bug 239550 has been marked as a duplicate of this bug. ***
*** Bug 262981 has been marked as a duplicate of this bug. ***
*** Bug 302383 has been marked as a duplicate of this bug. ***
*** Bug 295581 has been marked as a duplicate of this bug. ***
*** Bug 360654 has been marked as a duplicate of this bug. ***
*** Bug 362132 has been marked as a duplicate of this bug. ***
> Is there a reason here to make it not throw?

Iterating over document can throw an error, even if there's no attempt to use the property.

for each( var propValue in document ) { ... }
for( var [propName, propValue] in document ) { ... }
In XulRunner trunk: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-DE; rv:1.9a5pre) Gecko/20070525 this bug occures too.
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
domConfig was removed by Bug 615509.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Status should be set to RESOLVED WONT FIX as this bug is not invalid for the release it was filed for, but is obsolete for upcoming release. So status RESOLVED INVALID is not correct. Correct status is RESOLVED WONT FIX because the domConfig interface this bug belongs to will be removed in XulRunner 6.0.
George Maaß not sure this was explained in an other way to me. This Bug is invalid because it refers to something that doesn't exists anymore. I think it's not important when it will be removed from where. But i have no experience with the DOM component, so it might as well we Wontfix. (Actually i don't really care about the resolution thought)
I'd argue it's fixed: accessing document.domConfig doesn't throw anymore.
Assignee: general → nobody
Resolution: INVALID → FIXED
Target Milestone: --- → mozilla6
The resolution should be WORKSFORME, see bug 385520
FIXED only when we exactly know which bug/patch fixed that.
Biju, we do know that.  The bug number is even listed in comment 17.

Verified fixed.  Please no more noise in this bug!
Status: RESOLVED → VERIFIED
Depends on: 615509
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: