nsGenericContainerElement::GetAttribute out param wrong and FIX

VERIFIED FIXED in M6

Status

()

P3
minor
VERIFIED FIXED
20 years ago
20 years ago

People

(Reporter: hjtoi-bugzilla, Assigned: vidur)

Tracking

Trunk
All
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

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;
  }

Updated

20 years ago
Assignee: troy → kipp

Updated

20 years ago
Assignee: kipp → vidur
(Assignee)

Updated

20 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

20 years ago
Target Milestone: M6
(Assignee)

Comment 1

20 years ago
Makes sense. I have it in my tree and will check it in after the M5 freeze.
(Assignee)

Updated

20 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 2

20 years ago
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.