Closed
Bug 1226144
Opened 10 years ago
Closed 10 years ago
[Presentation API] Free sessionId before using it
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: chunmin, Assigned: chunmin)
Details
(Whiteboard: [ft:conndevices])
Attachments
(2 files, 2 obsolete files)
|
6.87 KB,
text/plain
|
Details | |
|
1.12 KB,
patch
|
chunmin
:
review+
jocheng
:
approval‑mozilla‑b2g44+
|
Details | Diff | Splinter Review |
>PresentationIPCService::MonitorResponderLoading(const nsAString& aSessionId,
> nsIDocShell* aDocShell)
>{
> MOZ_ASSERT(NS_IsMainThread());
>
> mCallback = new PresentationResponderLoadingCallback(aSessionId);
> return mCallback->Init(aDocShell);
>}
>PresentationIPCService::NotifyReceiverReady(const nsAString& aSessionId,
> uint64_t aWindowId)
>{
> ...
> ...
> mCallback = nullptr;
> NS_WARN_IF(!sPresentationChild->SendNotifyReceiverReady(nsAutoString(aSessionId)));
> return NS_OK;
>}
The |aSessionId| passed into |SendNotifyReceiverReady|[1] is holded by |PresentationCallbacks|, which is created in PresentationIPCService::MonitorResponderLoading.
|mCallback = nullptr|[4] above will free the |PresentationCallbacks| and lose |aSessionId| before it's passed into |SendNotifyReceiverReady|[1]
[1] https://dxr.mozilla.org/mozilla-central/source/dom/presentation/ipc/PresentationIPCService.cpp#258
[2] https://dxr.mozilla.org/mozilla-central/source/dom/presentation/PresentationCallbacks.h#61
[3] https://dxr.mozilla.org/mozilla-central/source/dom/presentation/ipc/PresentationIPCService.cpp#287
[4] https://dxr.mozilla.org/mozilla-central/source/dom/presentation/ipc/PresentationIPCService.cpp#257
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Comment 2•10 years ago
|
||
Hi, Sean,
I was wondering if you could review this small modification
Assignee: nobody → cchang
Attachment #8689949 -
Flags: review?(selin)
Comment 3•10 years ago
|
||
Comment on attachment 8689949 [details] [diff] [review]
Free presentation sessionId after using it
Review of attachment 8689949 [details] [diff] [review]:
-----------------------------------------------------------------
It looks good to me. Thanks for taking this.
::: dom/presentation/ipc/PresentationIPCService.cpp
@@ +257,2 @@
> NS_WARN_IF(!sPresentationChild->SendNotifyReceiverReady(nsAutoString(aSessionId)));
> + mCallback = nullptr;
nit: please add a comment briefly describing why we need to do so. Then it's less likely that someone would make similar mistakes.
Attachment #8689949 -
Flags: review?(selin) → review+
| Assignee | ||
Comment 4•10 years ago
|
||
| Assignee | ||
Comment 5•10 years ago
|
||
Adding a brief comment and carry r+
Attachment #8689949 -
Attachment is obsolete: true
Attachment #8692450 -
Flags: review+
| Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
| Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 6•10 years ago
|
||
fix typo
Attachment #8692450 -
Attachment is obsolete: true
Attachment #8692459 -
Flags: review+
| Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 8•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 9•9 years ago
|
||
Comment on attachment 8692459 [details] [diff] [review]
bug 1226144 - Free sessionId after using it
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 1069230
User impact if declined: send tab to TV might fail
Testing completed: yes
Risk to taking this patch (and alternatives if risky): N/A
String or UUID changes made by this patch: N/A
Attachment #8692459 -
Flags: approval‑mozilla‑b2g44?
Updated•9 years ago
|
blocking-b2g: --- → 2.5+
status-b2g-v2.5:
--- → affected
status-b2g-master:
--- → fixed
Whiteboard: [ft:conndevices]
Comment 10•9 years ago
|
||
Comment on attachment 8692459 [details] [diff] [review]
bug 1226144 - Free sessionId after using it
Approve for TV 2.5
Attachment #8692459 -
Flags: approval‑mozilla‑b2g44? → approval‑mozilla‑b2g44+
Comment 11•9 years ago
|
||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•