This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13363 - The MediaStream(MediaStream parentStream) constructor seems to be confusing the ordinary copy constructor behavior. Could it be an operation of MediaStream rather than a constructor?
Summary: The MediaStream(MediaStream parentStream) constructor seems to be confusing t...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 03:31 UTC by contributor
Modified: 2012-07-18 18:41 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2011-07-26 03:31:41 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/video-conferencing-and-peer-to-peer-communication.html
Multipage: http://www.whatwg.org/C#interface-definitions
Complete: http://www.whatwg.org/c#interface-definitions

Comment:
The MediaStream(MediaStream parentStream) constructor seems to be confusing
the ordinary copy constructor behavior. Could it be an operation of
MediaStream rather than a constructor?

Posted from: 114.174.180.16 by shiki.okasaka@gmail.com
User agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0
Comment 1 Ian 'Hixie' Hickson 2011-08-05 23:36:50 UTC
The Web doesn't have any copy constructors... is this really a problem?
Comment 2 Shiki Okasaka 2011-08-09 16:43:20 UTC
You're correct; currently this issue only hits our Web IDL compiler for C++0x binding, and technically this is not a problem in ECMAScript. 

 e.g., 
 MediaStream(MediaStream parentStream);  // C++
 error: invalid constructor; you probably meant 'MediaStream(const MediaStream&)'

If there's no other way in the HTML specification, we will find a way to work around it. However I think it would be nice if the use of this type of constructors is generally avoided in Web IDL. This might be compared to the 'new Object(value)' pattern in ECMAScript which simply returns value.