Fixing bug 207563. Make reparenting of wrapper for content nodes that are not part of a document work correctly. r=caillon@aillon.org, sr=peterv@netscape.com, a=brendan@mozilla.org, adt@netscape.com

This commit is contained in:
jst%netscape.com 2003-06-05 20:33:38 +00:00
parent 8ed5b3e892
commit 7fdf91f08e

View File

@ -716,7 +716,6 @@ nsContentUtils::doReparentContentWrapper(nsIContent *aChild,
}
JSObject *old;
rv = old_wrapper->GetJSObject(&old);
NS_ENSURE_SUCCESS(rv, rv);
@ -786,7 +785,7 @@ nsContentUtils::ReparentContentWrapper(nsIContent *aContent,
ni->GetDocument(*getter_AddRefs(old_doc));
}
if (!aOldDocument) {
if (!old_doc) {
// If we can't find our old document we don't know what our old
// scope was so there's no way to find the old wrapper