Trying to iterate over properties in document object

RESOLVED WORKSFORME

Status

()

Core
DOM: Core & HTML
P3
normal
RESOLVED WORKSFORME
18 years ago
14 years ago

People

(Reporter: Aaron Leventhal, Assigned: Chris Waterson)

Tracking

({dom0})

Trunk
Future
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

18 years ago
When I try to iterate of the document object, I get this error:

###!!! ASSERTION: write me: 'NotYetImplemented', file
c:\src\mozilla\rdf\content
\src\nsXULDocument.cpp, line 3757
###!!! Break: at file c:\src\mozilla\rdf\content\src\nsXULDocument.cpp,
line 3757

This is the code I used:
for (prop in document) {dump (prop +' ');}

It works when I iterate over window or another object.

Comment 1

18 years ago
Browser, not engine - changing component to DOM Level 0
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale

Comment 2

18 years ago
Which build ID was the reporter using? Please include this in 
any bug report; thanks -

I cannot reproduce this using Mozilla debug builds 2000-08-15 
on WinNT, Linux; or on Mac commercial build  2000081413.

I tried both the reporter's test case, and also this JavaScript URL:
javascript: var s=''; for(prop in document){s += prop + '  ';}; alert(s);

I did not get any errors or assertions. Marking WorksForMe -
Status: UNCONFIRMED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 3

18 years ago
Created attachment 13054 [details]
Install that in the chrome directory, it's an example of the bug
(Reporter)

Comment 4

18 years ago
This attachment shows the problem for Build 2000073008
RUN: mozilla.exe -chrome chrome://sherman/browser/content/sherman.xul
In the address bar, type obj document.
This runs BrowserLoadURL, which I have changed to run sherm_DOM_view_command()
Typing "obj javascript_obj_name" in the URL bar causes the package to 
introspect and list the properties on the text console. It works for everything 
except "obj document".
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
(Reporter)

Comment 5

18 years ago
Created attachment 13055 [details]
A chrome package that demonstrates the problem in Windows 98.

Comment 6

18 years ago
setting bug status to New
Status: UNCONFIRMED → NEW
Ever confirmed: true
This error comes from nsXULDocument::EnumerateProperty(), reassigning to hyatt
for investigation and prioritization.
Assignee: jst → hyatt

Comment 8

18 years ago
->waterson, per hyatt
Assignee: hyatt → waterson
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Keywords: dom0

Comment 9

15 years ago
Created attachment 124712 [details]
object property hack script

not sure if related, but Mozilla will throw an exception when you try to access
an object property that is XUL only. Attached is the correct JavaScript routine
for object property hacking.
When I do alert(document.config), then I get the following exception in todays
builds.
[Exception... "Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIDOM3Document.config]" nsresult: "0x80004001
(NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame ::
http://home.hccnet.nl/m.wargers/bookmarklets/elementprop.js :: showObject ::
line 23" data: no]

Using:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20030929
Firebird/0.7+

So when I try to iterate over the objects/properties/methods in the document
object I must handle the exception, otherwise the script doesn't work. 
Is this still an issue?  The code jst mentions in comment 7 no longer exists,
comment 10 is covered by other bugs....
No response, unable to reproduce problem, so marking worksforme.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.