Closed
Bug 1311275
Opened 9 years ago
Closed 9 years ago
Assertion failed in mozilla::net::nsIOService::GetCachedProtocolHandler
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla52
| Tracking | Status | |
|---|---|---|
| firefox52 | --- | fixed |
People
(Reporter: xeonchen, Assigned: xeonchen)
References
Details
(Whiteboard: [proxy][necko-active])
Attachments
(2 files)
|
1.81 KB,
text/plain
|
Details | |
|
2.04 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
Bug 1308275 breaks the assertion |NS_IsMainThread()| in |nsIOService::GetCachedProtocolHandler|
Comment 1•9 years ago
|
||
Instead of using NS_GetFileFromURLSpec you will have to decompose that function similar way as I did that in bug 1293327 (your are cc'ed now).
You simply need to get the file protocol directly (do_GetService) and call the GetFileFromURLSpec on it. The goal is to not use the 'cached protocol' path, which is not thread safe.
That's all.
Comment 2•9 years ago
|
||
You can also cache the protocol yourself if that would be used too often (do_GetService is relatively slow).
Comment 3•9 years ago
|
||
Another way to fix this would be to change nsIOService::GetCachedProtocolHandler() to be thread safe (but I assume that option was already considered).
For developers, is there a way to know which functions are thread safe? In other words, how could I have known in advance that NS_GetFileFromURLSpec() is not thread safe?
| Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8802790 -
Flags: review?(honzab.moz)
Updated•9 years ago
|
Attachment #8802790 -
Flags: review?(honzab.moz) → review+
| Assignee | ||
Comment 5•9 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=47700e6430e7095d2146acead65e4f4f6c4c30ed
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ee15d36745a8
use protocol service directly instead of NS_GetFileFromURLSpec; r=mayhemer
Keywords: checkin-needed
Comment 7•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•