Closed Bug 324058 Opened 19 years ago Closed 19 years ago

Fix nsStringStream compilation warning about multiple SetData versions

Categories

(Core :: XPCOM, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: darin.moz, Assigned: darin.moz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Fix nsStringStream compilation warning about multiple SetData versions.

Solution:
 * Eliminate nsIStringInputStream2
 * Implement nsISupportsCString instead
 * Implement nsIClassInfo

The result, JS code can use "@mozilla.org/io/string-input-stream;1" without explicitly QI'ing the object.  It'll be possible to do the following:

  var s = Cc["@mozilla.org/io/string-input-stream;1"].createInstance();
  s.data = "hello world";
  channel.setUploadStream(s, "text/plain", -1);
Attached patch v1 patchSplinter Review
Attachment #209012 - Flags: superreview?(bzbarsky)
Attachment #209012 - Flags: review?(cbiesinger)
We should probably do something like this for file streams as well.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 209012 [details] [diff] [review]
v1 patch

oh, this is a nice solution.
Attachment #209012 - Flags: review?(cbiesinger) → review+
Comment on attachment 209012 [details] [diff] [review]
v1 patch

I like!
Attachment #209012 - Flags: superreview?(bzbarsky) → superreview+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Blocks: 602724
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: