RESOLVED FIXED110333
Implement ID for RTCStatsReport object
https://bugs.webkit.org/show_bug.cgi?id=110333
Summary Implement ID for RTCStatsReport object
Harald Alvestrand
Reported 2013-02-20 05:42:08 PST
Patch to implement ID support in RTCStatsReport. - Add the ID property to RTCStatsReport - Add the get-by-ID named getter to RTCStatsResponse - Move the actual content of stats from RTCStatsElement to RTCStatsReport Preserve RTCStatsElement API until Chrome has been updated, but don't bother preserving the local/remote distinction.
Attachments
Patch (17.04 KB, patch)
2013-02-20 06:02 PST, Harald Alvestrand
no flags
Patch (22.79 KB, patch)
2013-02-22 02:35 PST, Harald Alvestrand
no flags
This version of the patch should be ready. The previous ones were basically trybot probes. (28.41 KB, patch)
2013-03-08 06:00 PST, Harald Alvestrand
no flags
Patch (28.42 KB, patch)
2013-03-08 06:24 PST, Harald Alvestrand
no flags
Patch (30.11 KB, patch)
2013-03-08 06:52 PST, Harald Alvestrand
no flags
Patch (31.05 KB, patch)
2013-03-08 07:18 PST, Harald Alvestrand
no flags
Patch (31.16 KB, patch)
2013-03-08 15:09 PST, Harald Alvestrand
no flags
Harald Alvestrand
Comment 1 2013-02-20 06:02:39 PST
Harald Alvestrand
Comment 2 2013-02-22 02:35:12 PST
WebKit Review Bot
Comment 3 2013-02-22 03:48:50 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Harald Alvestrand
Comment 4 2013-02-22 06:28:02 PST
The API update that this patch is the start on is here: http://dev.w3.org/2011/webrtc/editor/archives/20130222/webrtc.html
Tommy Widenflycht
Comment 5 2013-02-22 06:52:33 PST
Comment on attachment 189729 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189729&action=review > Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:57 > + it != m_stats.end(); ++it) { One line please > Source/WebCore/platform/chromium/support/WebRTCStatsResponse.cpp:60 > + return m_private->addReport(id, type, timestamp); Please add ASSERT(m_private) first in these functions. Bettar safe than sorry.
WebKit Review Bot
Comment 6 2013-02-25 17:08:43 PST
Comment on attachment 189729 [details] Patch Attachment 189729 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16760381 New failing tests: fast/multicol/block-axis-vertical-lr.html
Peter Beverloo (cr-android ews)
Comment 7 2013-02-28 04:49:23 PST
Comment on attachment 189729 [details] Patch Attachment 189729 [details] did not pass cr-android-ews (chromium-android): Output: http://webkit-commit-queue.appspot.com/results/16793281
Harald Alvestrand
Comment 8 2013-03-08 06:00:22 PST
Created attachment 192210 [details] This version of the patch should be ready. The previous ones were basically trybot probes.
Peter Beverloo (cr-android ews)
Comment 9 2013-03-08 06:14:24 PST
Comment on attachment 192210 [details] This version of the patch should be ready. The previous ones were basically trybot probes. Attachment 192210 [details] did not pass cr-android-ews (chromium-android): Output: http://webkit-commit-queue.appspot.com/results/17110056
EFL EWS Bot
Comment 10 2013-03-08 06:18:50 PST
Comment on attachment 192210 [details] This version of the patch should be ready. The previous ones were basically trybot probes. Attachment 192210 [details] did not pass efl-ews (efl): Output: http://webkit-commit-queue.appspot.com/results/17016174
Harald Alvestrand
Comment 11 2013-03-08 06:24:25 PST
EFL EWS Bot
Comment 12 2013-03-08 06:37:50 PST
Harald Alvestrand
Comment 13 2013-03-08 06:52:36 PST
EFL EWS Bot
Comment 14 2013-03-08 07:00:16 PST
Harald Alvestrand
Comment 15 2013-03-08 07:18:42 PST
Adam Barth
Comment 16 2013-03-08 14:31:37 PST
Comment on attachment 192224 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192224&action=review > Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:37 > - return adoptRef(new RTCStatsReport()); > + return adoptRef(new RTCStatsReport("inner fake ID", "inner fake type", 0)); What's up with these strings? They seems like odd things to use in production code. Should we use empty or null strings instead? > Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:45 > +RTCStatsReport::RTCStatsReport(String id, String type, double timestamp) String -> const String& Almost all the time you take a String as a parameter to a function, you want to use a const String& to avoid churning the refcount on the underlying StringImpl object. > Source/WebCore/Modules/mediastream/RTCStatsResponse.cpp:31 > + This addition seems spurious.
Harald Alvestrand
Comment 17 2013-03-08 15:09:43 PST
Adam Barth
Comment 18 2013-03-08 15:13:59 PST
Comment on attachment 192293 [details] Patch Thanks.
Harald Alvestrand
Comment 19 2013-03-08 15:19:02 PST
Comment on attachment 192224 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192224&action=review Thanks - fixed the comments. >> Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:37 >> + return adoptRef(new RTCStatsReport("inner fake ID", "inner fake type", 0)); > > What's up with these strings? They seems like odd things to use in production code. Should we use empty or null strings instead? This function is part of the //DEPRECATED stuff that I plan to remove week after next (after landing the Chromium patches that stop all usage of the deprecated interface). The new interface should never have null strings for these, so I want something that's easy to see and not invalid. >> Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:45 >> +RTCStatsReport::RTCStatsReport(String id, String type, double timestamp) > > String -> const String& > > Almost all the time you take a String as a parameter to a function, you want to use a const String& to avoid churning the refcount on the underlying StringImpl object. Done! >> Source/WebCore/Modules/mediastream/RTCStatsResponse.cpp:31 >> + > > This addition seems spurious. Fixed.
WebKit Review Bot
Comment 20 2013-03-08 15:48:07 PST
Comment on attachment 192293 [details] Patch Clearing flags on attachment: 192293 Committed r145279: <http://trac.webkit.org/changeset/145279>
WebKit Review Bot
Comment 21 2013-03-08 15:48:13 PST
All reviewed patches have been landed. Closing bug.
Alberto Garcia
Comment 22 2013-03-22 07:06:01 PDT
Hey, I can't link the BlackBerry port after this patch. DerivedSources/WebCore/JSRTCStatsResponse.cpp.o: In function `WebCore::JSRTCStatsResponse::getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned int, JSC::PropertySlot&)': DerivedSources/WebCore/JSRTCStatsResponse.cpp:182: undefined reference to `WebCore::JSRTCStatsResponse::canGetItemsForName(JSC::ExecState*, WebCore::RTCStatsResponse*, JSC::PropertyName)' DerivedSources/WebCore/JSRTCStatsResponse.cpp.o: In function `WTF::StringImpl::operator delete(void*)': Source/WTF/wtf/text/StringImpl.h:135: undefined reference to `WebCore::JSRTCStatsResponse::nameGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName)' ...
Harald Alvestrand
Comment 23 2013-03-22 08:00:34 PDT
This looks like a reaction to the use of the "NamedGetter" control in RTCStatsResponse.idl. In Chrome, it was enough to add the namedItem function in the IDL and implement it to have this function correctly. Can you check if you have the NamedGetter in any other IDL function that you currently compile, and if so, what functions there have to be to support it? (dom/NodeList and html/HTMLCollection have the same shape to their interfaces)
Alberto Garcia
Comment 24 2013-03-22 09:28:18 PDT
(In reply to comment #23) > Can you check if you have the NamedGetter in any other IDL function that you currently compile, and if so, what functions there have to be to support it? > (dom/NodeList and html/HTMLCollection have the same shape to their interfaces) In those cases, JSNodeList::nameGetter() and JSNodeList::canGetItemsForName() are defined in Source/WebCore/bindings/js/ But there's no such implementation for RTCStatsResponse.
Carlos Garcia Campos
Comment 25 2013-03-26 05:03:40 PDT
(In reply to comment #22) > Hey, I can't link the BlackBerry port after this patch. > > DerivedSources/WebCore/JSRTCStatsResponse.cpp.o: In function `WebCore::JSRTCStatsResponse::getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned int, JSC::PropertySlot&)': > DerivedSources/WebCore/JSRTCStatsResponse.cpp:182: undefined reference to `WebCore::JSRTCStatsResponse::canGetItemsForName(JSC::ExecState*, WebCore::RTCStatsResponse*, JSC::PropertyName)' > > DerivedSources/WebCore/JSRTCStatsResponse.cpp.o: In function `WTF::StringImpl::operator delete(void*)': > Source/WTF/wtf/text/StringImpl.h:135: undefined reference to `WebCore::JSRTCStatsResponse::nameGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName)' > > ... I don't think this is a BlackBerry specific build failure, but any port using JSC and building with media stream enabled would fail to build. I've opened a new bug: https://bugs.webkit.org/show_bug.cgi?id=113294
Note You need to log in before you can comment on or make changes to this bug.