Bug 75076 - Robustify UserMediaClient and UserMediaRequest lifetime handling
Summary: Robustify UserMediaClient and UserMediaRequest lifetime handling
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-22 02:44 PST by Adam Bergkvist
Modified: 2013-03-06 09:20 PST (History)
6 users (show)

See Also:


Attachments
Proposed patch (7.48 KB, patch)
2011-12-22 02:58 PST, Adam Bergkvist
darin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bergkvist 2011-12-22 02:44:24 PST
As discussed in: https://bugs.webkit.org/show_bug.cgi?id=70897#c34

UserMediaClient should take ownership of a UserMediaRequest right away instead of passing it via UserMediaCenter so that it can notify the request if it goes away during querying of media stream sources.
Comment 1 Adam Bergkvist 2011-12-22 02:58:34 PST
Created attachment 120296 [details]
Proposed patch
Comment 2 Adam Barth 2011-12-22 09:22:14 PST
Comment on attachment 120296 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=120296&action=review

> Source/WebCore/mediastream/UserMediaRequest.cpp:71
> +    m_client->registerRequest(this);

Should this be willStartRequest?

> Source/WebKit/chromium/src/UserMediaClientImpl.cpp:57
> +void UserMediaClientImpl::registerRequest(PassRefPtr<UserMediaRequest>)
> +{
> +}

Is this function supposed to do something?
Comment 3 Adam Barth 2011-12-22 09:24:59 PST
I don't quite understand what this patch is doing.  (I don't doubt that it's doing something useful---I just don't quite understand.)
Comment 4 Darin Adler 2012-08-14 12:42:25 PDT
Comment on attachment 120296 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=120296&action=review

> Source/WebKit/chromium/src/UserMediaClientImpl.cpp:62
> -        m_client->requestUserMedia(request, sources);
> +        m_client->requestUserMedia(PassRefPtr<UserMediaRequest>(request), sources);

Why is this typecast needed? Normally you can pass a raw pointer to an argument of type PassRefPtr without an explicit type conversion.
Comment 5 Darin Adler 2013-03-06 09:20:35 PST
Comment on attachment 120296 [details]
Proposed patch

review- because we didn’t get answers to our questions and it’s been in the review queue over a year