Fix nsStringStream compilation warning about multiple SetData versions

RESOLVED FIXED in mozilla1.9alpha1

Status

()

--
major
RESOLVED FIXED
13 years ago
8 years ago

People

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

Tracking

(Blocks: 1 bug)

Trunk
mozilla1.9alpha1
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

13 years ago
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);
(Assignee)

Comment 1

13 years ago
Created attachment 209012 [details] [diff] [review]
v1 patch
Attachment #209012 - Flags: superreview?(bzbarsky)
Attachment #209012 - Flags: review?(cbiesinger)
(Assignee)

Comment 2

13 years ago
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+
(Assignee)

Comment 5

13 years ago
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.