Closed
Bug 1271921
Opened 9 years ago
Closed 9 years ago
Log Deprecation within ioService when calling NewChannel2() fails
Categories
(Core :: DOM: Security, defect)
Core
DOM: Security
Tracking
()
RESOLVED
INVALID
People
(Reporter: ckerschb, Assigned: ckerschb)
References
(Blocks 1 open bug)
Details
(Whiteboard: [domsecurity-active])
Attachments
(1 file)
3.44 KB,
patch
|
sicking
:
review-
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8751210 -
Flags: review?(jonas)
Comment on attachment 8751210 [details] [diff] [review]
bug_1271921_log_deprecation_warning_within_ioservice.patch
Review of attachment 8751210 [details] [diff] [review]:
-----------------------------------------------------------------
Actually, I don't think we should do this. I'm not convinced that I prefer addons implementing asyncOpen2 themselves. It seems quite easy for them to forget to do the proper security checks.
Attachment #8751210 -
Flags: review?(jonas) → review-
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Jonas Sicking (:sicking) from comment #2)
> Actually, I don't think we should do this. I'm not convinced that I prefer
> addons implementing asyncOpen2 themselves. It seems quite easy for them to
> forget to do the proper security checks.
Well, at the moment we fall back to using AsyncOpen() in case AsyncOpen2() is not implemented. AsyncOpen() doesn't do any security checks at all, so no difference in my opinion. The reason why I would like to log a warning is, because we could really deprecate asyncOpen completely and move the logic from asyncOpen into asyncOpen2 at some point.
Flags: needinfo?(jonas)
> Well, at the moment we fall back to using AsyncOpen() in case AsyncOpen2() is not implemented.
No we don't. We implement AsyncOpen2 ourselves when newChannel2 is not implemented. No?
Flags: needinfo?(jonas)
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Jonas Sicking (:sicking) from comment #4)
> > Well, at the moment we fall back to using AsyncOpen() in case AsyncOpen2() is not implemented.
>
> No we don't. We implement AsyncOpen2 ourselves when newChannel2 is not
> implemented. No?
Arrh, sorry for the confusion. Not AsyncOpen!!!
s/asyncOpen/newchannel in comment 3.
In case NewChannel2() is not implemented, we fall back to using NewChannel().
Assignee | ||
Comment 6•9 years ago
|
||
You confused me within comment 2. The deprecation warning is only about NewChannel.
When newChannel2 is not implemented, we don't fall back to using newChannel. We use newChannel but we *also* create a wrapper which properly implements AsyncOpen2. I think that's better than asking addon developers to implement AsyncOpen2 themselves.
Assignee | ||
Comment 8•9 years ago
|
||
Oh, sure, you are right, that is indeed the better solution. But that also means we can never really deprecate newChannel.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
We can deprecate IOService.newChannel. But we couldn't deprecate nsIProtocolHandler.newChannel indeed. But only nsIOService.cpp should be calling nsIProtocolHandler.newChannel.
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Jonas Sicking (:sicking) from comment #9)
> We can deprecate IOService.newChannel. But we couldn't deprecate
> nsIProtocolHandler.newChannel indeed. But only nsIOService.cpp should be
> calling nsIProtocolHandler.newChannel.
Sure, agreed. I am just worried if we don't clean up everything our code gets messy over time.
You need to log in
before you can comment on or make changes to this bug.
Description
•