Make all nsIURI attributes readonly

RESOLVED FIXED in Firefox 60

Status

()

defect
P2
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: valentin, Assigned: valentin)

Tracking

(Blocks 1 bug)

Trunk
mozilla60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 attachment)

Comment hidden (empty)
Comment hidden (mozreview-request)

Comment 3

a year ago
mozreview-review
Comment on attachment 8946535 [details]
Bug 1434163 - Make all nsIURI attributes readonly

https://reviewboard.mozilla.org/r/216554/#review222432

::: netwerk/base/nsIURI.idl:140
(Diff revision 1)
> -    attribute AUTF8String password;
> +    readonly attribute AUTF8String password;
>  
>      /**
>       * The host:port (or simply the host, if port == -1).
>       *
>       * If this attribute is set to a value that only has a host part, the port

it can no longer be set, this comment should probably be on the mutator?

::: netwerk/test/gtest/TestStandardURL.cpp:13
(Diff revision 1)
>  #include "nsPrintfCString.h"
>  #include "nsComponentManagerUtils.h"
>  #include "nsIURIMutator.h"
> +#define protected public
> +#include "../../base/nsStandardURL.h"
> +using mozilla::net::nsStandardURL;

wow!  that's a *HACK* :D

you should at least #undef it :)))

can't this somehow be achieved by deriving from nsStandardURL and 'public: using blabla' ?

nsStandardURL is not marked final (but maybe should be....)

other trick could be to have a predeclared friend class that will be implemented here

OTOH, it's just a test and if it builds on all platforms then why not take this...
Attachment #8946535 - Flags: review?(honzab.moz) → review+

Comment 4

a year ago
Hmm, a few methods are become private here, like SetSpecInternal().
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 11

a year ago
Any ETA for landing this?
I was thinking of landing it today or tomorrow, after a final try run.

Comment 13

a year ago
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/74fc20523198
Make all nsIURI attributes readonly r=mayhemer

Comment 14

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/74fc20523198
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
We were sort of hoping this would have qualified as a "risky patch or a large patch" that would be subject to the March 1 code freeze for Firefox 60 that was announced on m.d.platform. I guess not :(

Comment 16

a year ago
The risky one was bug 1433958 which landed on 27th Feb. ;-)
You need to log in before you can comment on or make changes to this bug.