[webkit-reviews] review granted: [Bug 97095] MediaStream API: Extend UserMediaRequest with a ownerDocument method : [Attachment 164871] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 20 11:03:54 PDT 2012
Adam Barth <abarth at webkit.org> has granted Tommy Widenflycht
<tommyw at google.com>'s request for review:
Bug 97095: MediaStream API: Extend UserMediaRequest with a ownerDocument method
https://bugs.webkit.org/show_bug.cgi?id=97095
Attachment 164871: Patch
https://bugs.webkit.org/attachment.cgi?id=164871&action=review
------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=164871&action=review
> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:80
> + if (m_scriptExecutionContext) {
> + ASSERT(m_scriptExecutionContext->isDocument());
> + return static_cast<Document*>(m_scriptExecutionContext);
> + }
> +
> + return 0;
The other way you could have done this, by the way, is:
ASSERT(isMainThread());
return static_cast<Document*>(m_scriptExecutionContext);
But this is fine too.
More information about the webkit-reviews
mailing list