Closed Bug 610134 Opened 14 years ago Closed 14 years ago

waitForPageLoad should not set property on wrapped HTMLDocument

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Keywords: regression, Whiteboard: [mozmill-1.5.1+])

Attachments

(1 file, 1 obsolete file)

Not sure which change exactly caused us to fail when acting on content elements but bug 503277 made it definitely visible. All documents which are returned by controller.tabs.activeTab are wrapped and that's the reason why elements defined before a page load cannot be accessed afterward. The wrapped object has been replaced and the document is simply not existent anymore. I will have to investigate all possible areas were unwrapping of the document has to take place. This should block Mozmill 1.5.1.
No longer blocks: 609062
Ok, after some more investigation my initial comment was not correct. Elements from content shouldn't be unwrapped in all cases because that can open security wholes. There is a much broader problem involved with page loading which I have opened for discussion here: http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/b86fe14e388cb92c# Lets stick this bug for the waitForPageLoad case. That means the following things have been taken care on the upcoming patch: * We shouldn't set custom properties to a XPCNativeWrapper object. In our case it will be the HTMLDocument node which is wrapped. Instead the documentLoaded property should be set to the browser itself. This node is not wrapped because its in chrome space. It's identical to the window.documentLoaded property. * Searching for the tab can be made 100% safe by using window.gBrowser.getBrowserForDocument. Comparing the browser nodes returns the correct tab node. Comparing the HTMLDocuments is faulty because of the above mentioned issue. * There was a bug which always has used the active tab, even when another one has been specified. That slipped through our both fingers on bug 604878. :/
Assignee: nobody → hskupin
Blocks: 604878
Status: NEW → ASSIGNED
Summary: Always work on unwrapped HTML documents for content related actions → waitForPageLoad should not set property on wrapped HTMLDocument
Whiteboard: [mozmill-1.5.2?] → [mozmill-1.5.1?]
Attached patch Patch v1 (obsolete) (deleted) — Splinter Review
Attachment #488717 - Flags: review?(ctalbert)
Attached patch Patch v1.1 (deleted) — Splinter Review
Also fix the remaining script warnings when documentLoaded hasn't been set yet.
Attachment #488717 - Attachment is obsolete: true
Attachment #488722 - Flags: review?(ctalbert)
Attachment #488717 - Flags: review?(ctalbert)
Blocks: 608448
Attachment #488722 - Flags: review?(ctalbert) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-1.5.1?] → [mozmill-1.5.1+]
Depends on: 611347
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: