Closed Bug 396389 Opened 17 years ago Closed 17 years ago

[FIX]nsStandardURL needs to serialize mHostEncoding and mSupportsFileURL

Categories

(Core :: Networking, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

Attached patch FixSplinter Review
As things stand, round-tripping a file:// URI through Write/Read gives a URI that is not Equals() to the original one.

Note to self: This patch applies after bug 369566.
Attachment #281131 - Flags: superreview?(cbiesinger)
Attachment #281131 - Flags: review?(cbiesinger)
Priority: -- → P1
Target Milestone: --- → mozilla1.9 M9
+    // mSpecEncoding and mHostA are just caches that can be recovered as needed.

perhaps there should be an assertion in Read to make sure that they haven't already been set (to values other than eEncoding_Unknown/null)?
Attachment #281131 - Flags: superreview?(cbiesinger)
Attachment #281131 - Flags: superreview+
Attachment #281131 - Flags: review?(cbiesinger)
Attachment #281131 - Flags: review+
Comment on attachment 281131 [details] [diff] [review]
Fix

I can add that assertion, sure.

Requesting approval.  This is a fairly safe patch that fixes a bug in URI deserialization that makes file URIs stop being file URIs.
Attachment #281131 - Flags: approval1.9?
Attachment #281131 - Flags: approval1.9? → approval1.9+
Fixed, with the assertions added.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Attached patch testcaseSplinter Review
Attachment #282360 - Flags: superreview?(cbiesinger)
Attachment #282360 - Flags: review?(cbiesinger)
Comment on attachment 282360 [details] [diff] [review]
testcase

given that the streams are object in/output streams, shouldn't the vars be called objectStream? also, instead of adding 2, objectInStream/objectOutStream seem like better names

+  /*  var uri3 = round_trip(uri1);
+  do_check_true(uri3 instanceof Ci.nsIFileURL);
+  do_check_true(uri1.equals(uri3));
+  */

Why is that commented out?

since you don't have a profile, there's not much point in resetting prefs to their old value... the changes won't be written anyway
Attachment #282360 - Flags: superreview?(cbiesinger)
Attachment #282360 - Flags: superreview+
Attachment #282360 - Flags: review?(cbiesinger)
Attachment #282360 - Flags: review+
Fixed the names.  Removed the comments from around that code; that was just me testing things.

As for the prefs, I wanted this to not break if it ever moves to a different test framework.

Checked in the test with those changes.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: