Closed Bug 5684 Opened 25 years ago Closed 25 years ago

nsGenericContainerElement::GetAttribute out param wrong and FIX

Categories

(Core :: Layout, defect, P3)

All
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hjtoi-bugzilla, Assigned: vidur)

References

()

Details

When the method returns NS_CONTENT_ATTR_NOT_THERE (a success code if you do
NS_SUCCEEDED()), it does not make the outgoing string empty, which it should.

FIX:

*** nsGenericElement.cpp	Mon Apr 26 11:09:53 1999
--- nsGenericElement-fixed.cpp	Thu Apr 29 11:35:54 1999
***************
*** 1779,1784 ****
--- 1779,1792 ----
      }
    }

+   if (rv == NS_CONTENT_ATTR_NOT_THERE) {
+     // In other cases we already set the out param.
+     // Since we are returning a success code we'd better do
+     // something about the out parameters (someone may have
+     // given us a non-empty string).
+     aResult.Truncate();
+   }
+
    return rv;
  }
Assignee: troy → kipp
Assignee: kipp → vidur
Status: NEW → ASSIGNED
Target Milestone: M6
Makes sense. I have it in my tree and will check it in after the M5 freeze.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Checked in on 5/5/1999.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.