Closed
Bug 1220007
Opened 9 years ago
Closed 9 years ago
make intercepted channel's use of ConsoleReportCollector less fragile
Categories
(Core :: DOM: Service Workers, defect)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: bkelly, Assigned: bkelly)
References
Details
Attachments
(2 files, 1 obsolete file)
5.25 KB,
patch
|
bzbarsky
:
review+
ritu
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
15.83 KB,
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
The code in P10 of bug 1215140 depends on the intercepted channels lifecycle to be threadsafe. We should make this a bit more robust. Possible plan: 1) Store a ConsoleReporterCollector in the intercepted channel itself that survives as long as necessary. 2) Add pending reports to the that collector on the worker thread. 3) When the InterceptedChannel is back on the main thread then send the logs to the nsIChannel's collector. This probably means adding an nsIConsoleReporterCollector::SwapConsoleReports() methods.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8681361 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8681362 -
Flags: review?(bzbarsky)
Comment 3•9 years ago
|
||
Comment on attachment 8681361 [details] [diff] [review] P1 Allow ConsoleReportCollectors to flush to another collector. r=bz r=me and special bonus points for scoping the lock so that foo->FlushConsoleReports(foo) (dumb as that is) will not deadlock.
Attachment #8681361 -
Flags: review?(bzbarsky) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8681362 [details] [diff] [review] P2 Make InterceptedChannel's collect logs locally and only flush to nsIChannel on main thread r=bz Why do we need the changes to the IDL file? What was wrong with continuing to return the non-addrefed pointer? r=me modulo that, though I'm taking it on faith that you put those flush calls in all the right places.
Attachment #8681362 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #4) > Why do we need the changes to the IDL file? What was wrong with continuing > to return the non-addrefed pointer? The intercepted channel is a main thread object. In theory it could go away after get the handle the nsIConsoleReportCollector. Hold a strong ref to the collector seemed the most thread safe to me.
Comment 6•9 years ago
|
||
Ah, ok. May be worth documenting.
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #6) > Ah, ok. May be worth documenting. Honestly, its just a little bit of extra protection. The current code should prevent that from happening, but this is just trying to make it more bullet proof to future changes. I don't want to confuse things by warning against something that doesn't currently happen.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c253b6bd00b1 https://hg.mozilla.org/integration/mozilla-inbound/rev/d8d75be11275
Comment 9•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c253b6bd00b1 https://hg.mozilla.org/mozilla-central/rev/d8d75be11275
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 10•9 years ago
|
||
sorry had to back this out. When this changes got merged back to the integration trees i noticed this is causing somehow a bustage on b2g-emulator L debug builds like https://treeherder.mozilla.org/logviewer.html#?job_id=3245188&repo=b2g-inbound and we didn't saw this before because emulator L debug builds seem to run only there.
Flags: needinfo?(bkelly)
Assignee | ||
Comment 11•9 years ago
|
||
Backouts: https://hg.mozilla.org/mozilla-central/rev/59a6ad6a921f https://hg.mozilla.org/mozilla-central/rev/aeabfab3ea4d and: https://hg.mozilla.org/integration/mozilla-inbound/rev/59a6ad6a921f https://hg.mozilla.org/integration/mozilla-inbound/rev/aeabfab3ea4d Its very strange that the compiler in b2g-inbound failed, while m-c and m-i did not.
Status: RESOLVED → REOPENED
Flags: needinfo?(bkelly)
Resolution: FIXED → ---
Assignee | ||
Comment 12•9 years ago
|
||
Try against b2g-inbound: https://treeherder.mozilla.org/#/jobs?repo=try&revision=42f600f27ce6
Assignee | ||
Comment 13•9 years ago
|
||
Updated patch to CLOBBER.
Attachment #8681362 -
Attachment is obsolete: true
Attachment #8682633 -
Flags: review+
Assignee | ||
Comment 14•9 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/9553150987e5 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/508d22157bca
Comment 15•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9553150987e5 https://hg.mozilla.org/mozilla-central/rev/508d22157bca
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Comment 16•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/9553150987e5 https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/508d22157bca
status-b2g-v2.5:
--- → fixed
Comment 17•9 years ago
|
||
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
status-b2g-v2.5:
fixed → ---
Assignee | ||
Updated•9 years ago
|
status-firefox43:
--- → wontfix
status-firefox44:
--- → affected
Assignee | ||
Comment 18•9 years ago
|
||
Comment on attachment 8681361 [details] [diff] [review] P1 Allow ConsoleReportCollectors to flush to another collector. r=bz Approval request for P1 and P2. All patches. Approval Request Comment [Feature/regressing bug #]: Service workers [User impact if declined]: I need this in order to uplift bug 1217909 and other dependent bugs. [Describe test coverage new/current, TreeHerder]: Local testing and mochitests. [Risks and why]: Minimal. Only affects service workers. [String/UUID change made/needed]: None
Attachment #8681361 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 19•9 years ago
|
||
Ritu, sorry for the direct NI, but if we could uplift this older patch it would make getting bug 1217909 on aurora much easier. I'd like to uplift tomorrow if I can. Thanks!
Flags: needinfo?(rkothari)
Comment on attachment 8681361 [details] [diff] [review] P1 Allow ConsoleReportCollectors to flush to another collector. r=bz This has been on Nightly for almost two weeks, seems safe to uplift to Aurora44.
Flags: needinfo?(rkothari)
Attachment #8681361 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(In reply to Ben Kelly [:bkelly] from comment #19) > Ritu, sorry for the direct NI, but if we could uplift this older patch it > would make getting bug 1217909 on aurora much easier. I'd like to uplift > tomorrow if I can. > > Thanks! No worries. Done!
Assignee | ||
Comment 22•9 years ago
|
||
Note for the sheriffs, I will uplift this myself along with bug 1217909.
Assignee | ||
Comment 23•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/f0b7aa7305ff https://hg.mozilla.org/releases/mozilla-aurora/rev/3f63e0a21969
Comment 24•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/f0b7aa7305ff https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/3f63e0a21969
status-b2g-v2.5:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•