Bug 166916

Summary: [WebRTC] Support modern RTCStatsReport
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: agouaillard, buildbot, cdumez, commit-queue, eric.carlson, jonlee, rniwa, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=159140
Bug Depends on: 167910    
Bug Blocks: 143211, 274976    
Attachments:
Description Flags
WIP
none
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
none
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews101 for mac-elcapitan
none
Archive of layout-test-results from ews116 for mac-elcapitan
none
Patch
none
Patch
none
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Fixing GTK build
none
Patch for landing none

youenn fablet
Reported 2017-01-10 17:42:29 PST
This requires supporting mapLike
Attachments
WIP (102.83 KB, patch)
2017-01-10 17:43 PST, youenn fablet
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.79 MB, application/zip)
2017-01-10 19:53 PST, Build Bot
no flags
Patch (103.75 KB, patch)
2017-01-11 22:19 PST, youenn fablet
no flags
Patch (103.81 KB, patch)
2017-01-11 22:27 PST, youenn fablet
no flags
Patch (111.21 KB, patch)
2017-01-12 10:25 PST, youenn fablet
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (861.35 KB, application/zip)
2017-01-12 11:37 PST, Build Bot
no flags
Archive of layout-test-results from ews116 for mac-elcapitan (1.69 MB, application/zip)
2017-01-12 11:38 PST, Build Bot
no flags
Patch (109.45 KB, patch)
2017-01-12 13:27 PST, youenn fablet
no flags
Patch (95.26 KB, patch)
2017-01-12 14:54 PST, youenn fablet
no flags
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.23 MB, application/zip)
2017-01-12 18:30 PST, Build Bot
no flags
Patch (96.58 KB, patch)
2017-01-17 15:01 PST, youenn fablet
no flags
Patch (142.44 KB, patch)
2017-02-17 14:08 PST, youenn fablet
no flags
Patch (142.39 KB, patch)
2017-02-17 14:16 PST, youenn fablet
no flags
Patch (142.58 KB, patch)
2017-02-17 14:43 PST, youenn fablet
no flags
Patch (148.05 KB, patch)
2017-02-17 17:25 PST, youenn fablet
no flags
Patch (148.05 KB, patch)
2017-02-17 18:16 PST, youenn fablet
no flags
Fixing GTK build (148.05 KB, patch)
2017-02-17 18:31 PST, youenn fablet
no flags
Patch for landing (147.70 KB, patch)
2017-02-27 17:11 PST, youenn fablet
no flags
youenn fablet
Comment 1 2017-01-10 17:43:21 PST
Build Bot
Comment 2 2017-01-10 19:53:46 PST
Comment on attachment 298537 [details] WIP Attachment 298537 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2867171 Number of test failures exceeded the failure limit.
Build Bot
Comment 3 2017-01-10 19:53:49 PST
Created attachment 298548 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
youenn fablet
Comment 4 2017-01-11 22:19:22 PST
youenn fablet
Comment 5 2017-01-11 22:27:32 PST
youenn fablet
Comment 6 2017-01-12 10:25:44 PST
Build Bot
Comment 7 2017-01-12 11:37:05 PST
Comment on attachment 298694 [details] Patch Attachment 298694 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2878259 New failing tests: webrtc/stats.html
Build Bot
Comment 8 2017-01-12 11:37:08 PST
Created attachment 298700 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 9 2017-01-12 11:38:44 PST
Comment on attachment 298694 [details] Patch Attachment 298694 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2878235 New failing tests: webrtc/stats.html
Build Bot
Comment 10 2017-01-12 11:38:47 PST
Created attachment 298701 [details] Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
youenn fablet
Comment 11 2017-01-12 13:27:25 PST
youenn fablet
Comment 12 2017-01-12 14:54:40 PST
Build Bot
Comment 13 2017-01-12 18:30:36 PST
Comment on attachment 298712 [details] Patch Attachment 298712 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2879934 New failing tests: fast/mediastream/MediaStream-video-element-track-stop.html
Build Bot
Comment 14 2017-01-12 18:30:40 PST
Created attachment 298745 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Sam Weinig
Comment 15 2017-01-13 10:12:56 PST
Comment on attachment 298712 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298712&action=review > Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:48 > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "id"), toJS<IDLDOMString>(state, globalObject, m_id)); > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "type"), toJS<IDLDOMString>(state, globalObject, String(type))); > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "timestamp"), toJS<IDLUnsignedLongLong>(timestamp)); I'm not thrilled with having so much JS code in non-bindings code. Are there any other ways to accomplish this while still keeping a more substantial boundary?
Sam Weinig
Comment 16 2017-01-13 10:28:19 PST
(In reply to comment #15) > Comment on attachment 298712 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=298712&action=review > > > Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:48 > > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "id"), toJS<IDLDOMString>(state, globalObject, m_id)); > > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "type"), toJS<IDLDOMString>(state, globalObject, String(type))); > > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "timestamp"), toJS<IDLUnsignedLongLong>(timestamp)); > > I'm not thrilled with having so much JS code in non-bindings code. Are > there any other ways to accomplish this while still keeping a more > substantial boundary? For instance, why couldn't we just use a HashMap as the backing map?
Sam Weinig
Comment 17 2017-01-13 10:31:59 PST
Comment on attachment 298712 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298712&action=review > Source/WebCore/bindings/js/JSDOMBinding.cpp:1039 > + mapLike.putDirect(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().backingMapPrivateName(), JSMap::create(mapLike.globalObject()->globalExec(), vm, mapLike.globalObject()->mapStructure()), DontEnum); If we do go the JSMap as backing map route, do we need to do something to prevent the user from tampering with the prototype of the Map object (e.g. have an JSInternalMap, like we have JSInternalPromise)?
youenn fablet
Comment 18 2017-01-13 10:32:28 PST
> I'm not thrilled with having so much JS code in non-bindings code. Are > there any other ways to accomplish this while still keeping a more > substantial boundary? We can move that code to bindings/js, something like a writable dictionary. > For instance, why couldn't we just use a HashMap as the backing map? We could but we would depart from https://heycam.github.io/webidl/#es-maplike. The goal of maplike is to be totally equivalent to es Map. For instance, iterators returned by maplike should be @MapIterator.
youenn fablet
Comment 19 2017-01-13 10:33:52 PST
(In reply to comment #17) > Comment on attachment 298712 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=298712&action=review > > > Source/WebCore/bindings/js/JSDOMBinding.cpp:1039 > > + mapLike.putDirect(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().backingMapPrivateName(), JSMap::create(mapLike.globalObject()->globalExec(), vm, mapLike.globalObject()->mapStructure()), DontEnum); > > If we do go the JSMap as backing map route, do we need to do something to > prevent the user from tampering with the prototype of the Map object (e.g. > have an JSInternalMap, like we have JSInternalPromise)? From my quick reading of webidl, we are to use the public slot of the Map object. But it would probably be safer to use private slots on the Map prototype.
youenn fablet
Comment 20 2017-01-13 11:26:22 PST
I'll fix the test and will improve the JS binding layering
Darin Adler
Comment 21 2017-01-14 22:00:49 PST
Comment on attachment 298712 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298712&action=review > Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:388 > + if (m_signalingState == SignalingState::Closed) > + promise.reject(INVALID_STATE_ERR); I think this is missing a return. Or am I mistaken? Do we have a test case covering this?
youenn fablet
Comment 22 2017-01-16 20:15:07 PST
(In reply to comment #21) > Comment on attachment 298712 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=298712&action=review > > > Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:388 > > + if (m_signalingState == SignalingState::Closed) > > + promise.reject(INVALID_STATE_ERR); > > I think this is missing a return. Or am I mistaken? Do we have a test case > covering this? That is right. LayoutTests/fast/mediastream/RTCPeerConnection-closed-state.html is covering this case. I am not sure why it has not caught it.
youenn fablet
Comment 23 2017-01-17 15:01:56 PST
youenn fablet
Comment 24 2017-01-17 15:03:21 PST
(In reply to comment #22) > (In reply to comment #21) > > Comment on attachment 298712 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=298712&action=review > > > > > Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:388 > > > + if (m_signalingState == SignalingState::Closed) > > > + promise.reject(INVALID_STATE_ERR); > > > > I think this is missing a return. Or am I mistaken? Do we have a test case > > covering this? > > That is right. > LayoutTests/fast/mediastream/RTCPeerConnection-closed-state.html is covering > this case. > I am not sure why it has not caught it. Since the change to make promise active dom objects, a promise may be rejected/resolved twice without getting notice. The second time, it just exits early.
youenn fablet
Comment 25 2017-01-17 15:05:31 PST
(In reply to comment #15) > Comment on attachment 298712 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=298712&action=review > > > Source/WebCore/Modules/mediastream/RTCStatsReport.cpp:48 > > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "id"), toJS<IDLDOMString>(state, globalObject, m_id)); > > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "type"), toJS<IDLDOMString>(state, globalObject, String(type))); > > + m_object->putDirect(vm, JSC::Identifier::fromString(&vm, "timestamp"), toJS<IDLUnsignedLongLong>(timestamp)); > > I'm not thrilled with having so much JS code in non-bindings code. Are > there any other ways to accomplish this while still keeping a more > substantial boundary? I added an UntypedDictionary. It might be useful in the future to have a kind of extensible IDLDictionary where additional key from the ones defined in the IDL could be put. In the case of WebRTC, this does not seem to be worth it since the dictionary information is not persistent as would be case for Dictionary attributes for instance.
Sam Weinig
Comment 26 2017-01-18 12:47:35 PST
This still feels like a step backwards. We spent a lot of effort to remove all the uses of Dictionary from WebCore, and this feels like it will have many of the same problems (e.g. incorrect dealing with exceptions / gc lifetimes). Can you explain again why this can't be backed by a HashMap or if needs to be ordered, some other map, where type conversions happen at the boundary?
youenn fablet
Comment 27 2017-01-18 17:43:54 PST
(In reply to comment #26) > This still feels like a step backwards. We spent a lot of effort to remove > all the uses of Dictionary from WebCore, and this feels like it will have > many of the same problems (e.g. incorrect dealing with exceptions / gc > lifetimes). This patch is doing two things: 1. adding support for MapLike 2. adding support for stats API which uses a promise that resolves to a MapLike of extensible dictionaries In this discussion, we should decouple the two. For item 1, the maplike is stored as a slot to the JSXX object. There should be no gc issues. As of exceptions, they could happen when creating the backing map like and storing it as a slot. They could also happen when adding items. I can only imagine memory exception in both cases. In our specific case, the only thing we could do would be to reject the promise with the given exception. For item 2,we could use IDL dictionaries instead to build RTCStats items. But this would be more code/less efficient/less flexible in that specific case. We would create structures, fill them, convert them to JS, add them to map like and here we go. > Can you explain again why this can't be backed by a HashMap or if needs to > be ordered, some other map, where type conversions happen at the boundary? WebIDL is defining maplike exactly as implemented in this patch: an object exposing data stored into a backing JS map. To expose it properly as defined by WebIDL, we need to send back MapIterator objects to methods like values or entries. A MapIterator is bound to a JS Map. The alternative I considered at some point was to use JS built-ins to feed the RTCStatsReport. Instead of resolving a fed RTCStatsReport, we would resolve the promise with a vector containing the different RTCStats. The JS built-in would be responsible to fill the backing map slot with the provided vector. I did not go this way since it is less generic and creating a temporary array is less efficient than directly adding items to the map. It is true though that the exception handling would be probably nicer. wdyt?
Sam Weinig
Comment 28 2017-01-18 19:09:16 PST
(In reply to comment #27) > (In reply to comment #26) > > This still feels like a step backwards. We spent a lot of effort to remove > > all the uses of Dictionary from WebCore, and this feels like it will have > > many of the same problems (e.g. incorrect dealing with exceptions / gc > > lifetimes). > > This patch is doing two things: > 1. adding support for MapLike > 2. adding support for stats API which uses a promise that resolves to a > MapLike of extensible dictionaries > > In this discussion, we should decouple the two. > > For item 1, the maplike is stored as a slot to the JSXX object. > There should be no gc issues. > As of exceptions, they could happen when creating the backing map like and > storing it as a slot. They could also happen when adding items. I can only > imagine memory exception in both cases. This is only true of a readonly maplike object. Once C++ land has to read values out of it, conversion exceptions can happen if I am not mistaken. > In our specific case, the only thing we could do would be to reject the > promise with the given exception. > > For item 2,we could use IDL dictionaries instead to build RTCStats items. > But this would be more code/less efficient/less flexible in that specific > case. > We would create structures, fill them, convert them to JS, add them to map > like and here we go. This would be no different than all the rest of IDL infrastructure. A c++ backing, wrapped by a JavaScript object. > > > Can you explain again why this can't be backed by a HashMap or if needs to > > be ordered, some other map, where type conversions happen at the boundary? > > WebIDL is defining maplike exactly as implemented in this patch: an object > exposing data stored into a backing JS map. > To expose it properly as defined by WebIDL, we need to send back MapIterator > objects to methods like values or entries. A MapIterator is bound to a JS > Map. > Is any of that actually user observable, or is the spec just using the language of the ES spec to define the behavior. If for instance, modifications to the Map prototype effect the behavior of maplike objects, then it probably makes sense to implement it using the JS Map. But if not, I would like to stick to our normal patterns. > The alternative I considered at some point was to use JS built-ins to feed > the RTCStatsReport. > Instead of resolving a fed RTCStatsReport, we would resolve the promise with > a vector containing the different RTCStats. The JS built-in would be > responsible to fill the backing map slot with the provided vector. > I did not go this way since it is less generic and creating a temporary > array is less efficient than directly adding items to the map. It is true > though that the exception handling would be probably nicer. > > wdyt? I prefer keeping our pattern of c++ wrapped by js object for these.
youenn fablet
Comment 29 2017-01-18 20:06:42 PST
> This is only true of a readonly maplike object. Once C++ land has to read > values out of it, conversion exceptions can happen if I am not mistaken. Right, I would expect WebCore binding code to actually enforce that key and value have the types defined by the maplike in the IDL. The storage in the backing map would happen in the binding code and WebCore regular code would get notified of the converted C++ key/value. > > In our specific case, the only thing we could do would be to reject the > > promise with the given exception. > > > > For item 2,we could use IDL dictionaries instead to build RTCStats items. > > But this would be more code/less efficient/less flexible in that specific > > case. > > We would create structures, fill them, convert them to JS, add them to map > > like and here we go. > > This would be no different than all the rest of IDL infrastructure. A c++ > backing, wrapped by a JavaScript object. In the RTCStatsReport specific case, the C++ structures (the dictionaries) would only last the time of the conversion. In the case of an attribute getter returning a dictionary, the corresponding C++ object will probably be kept, updated and manipulated. This is not the case here, we would just create the C++ structure for the purpose of obtaining the corresponding JS object. RTCStats are extensible, the WebIDL is not defining all fields provided by the WebRTC backend. We could beef up WebKit IDLs to cover all possible dictionaries. We would need to implement the marshalling of the WebRTC backend stats (a map) to the C++ structure which would be used to be converted to the dictionary. Currently, we just have to handle the type of each stat field. I do not see any advantage here. > > > > > Can you explain again why this can't be backed by a HashMap or if needs to > > > be ordered, some other map, where type conversions happen at the boundary? > > > > WebIDL is defining maplike exactly as implemented in this patch: an object > > exposing data stored into a backing JS map. > > To expose it properly as defined by WebIDL, we need to send back MapIterator > > objects to methods like values or entries. A MapIterator is bound to a JS > > Map. > > > > Is any of that actually user observable, or is the spec just using the > language of the ES spec to define the behavior. If for instance, > modifications to the Map prototype effect the behavior of maplike objects, > then it probably makes sense to implement it using the JS Map. But if not, I > would like to stick to our normal patterns. This is indeed user observable, maplike would be affected by Map/Map Iterator prototype changes.
Radar WebKit Bug Importer
Comment 30 2017-01-31 13:34:24 PST
youenn fablet
Comment 31 2017-02-02 08:19:53 PST
maplike and setlike being very close one from the other, I went trying to implement setlike in bug 159140. A similar design could be then applied to maplike.
youenn fablet
Comment 32 2017-02-17 14:08:43 PST
WebKit Commit Bot
Comment 33 2017-02-17 14:10:16 PST
Attachment 301985 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSDOMGuardedObject.h:60: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMMapLike.h:65: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMPromise.h:121: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 4 in 26 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 34 2017-02-17 14:16:08 PST
WebKit Commit Bot
Comment 35 2017-02-17 14:17:43 PST
Attachment 301986 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSDOMGuardedObject.h:60: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMMapLike.h:65: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMPromise.h:121: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 4 in 26 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 36 2017-02-17 14:43:54 PST
WebKit Commit Bot
Comment 37 2017-02-17 14:46:47 PST
Attachment 301990 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSDOMGuardedObject.h:60: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMMapLike.h:65: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMPromise.h:121: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 4 in 26 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 38 2017-02-17 17:25:17 PST
WebKit Commit Bot
Comment 39 2017-02-17 17:27:45 PST
Attachment 302021 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSDOMGuardedObject.h:60: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMMapLike.h:66: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMPromise.h:121: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 4 in 28 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 40 2017-02-17 18:16:16 PST
WebKit Commit Bot
Comment 41 2017-02-17 18:20:24 PST
Attachment 302030 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSDOMGuardedObject.h:60: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMMapLike.h:66: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMPromise.h:121: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 4 in 28 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 42 2017-02-17 18:31:37 PST
Created attachment 302032 [details] Fixing GTK build
WebKit Commit Bot
Comment 43 2017-02-17 18:35:49 PST
Attachment 302032 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSDOMGuardedObject.h:60: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMMapLike.h:66: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/bindings/js/JSDOMPromise.h:121: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 4 in 28 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 44 2017-02-23 16:52:26 PST
Comment on attachment 302032 [details] Fixing GTK build View in context: https://bugs.webkit.org/attachment.cgi?id=302032&action=review Let's write a test verifying the overwriting of maplike prototype so we can compare it with the behavior of other browsers and change the test if we change our minds. > Source/WebCore/Modules/mediastream/RTCStatsReport.h:41 > + extra space > Source/WebCore/bindings/scripts/test/TestMapLike.idl:26 > + maplike<DOMString, DOMString>; It would probably be a better test to have two different types to verify you got the right type in the right place.
Sam Weinig
Comment 45 2017-02-24 12:20:54 PST
Can you add tests that modify the Map prototype and show how it affects MapLike objects (for instance, replace the forEach function)?
youenn fablet
Comment 46 2017-02-27 08:24:43 PST
Here is the related WebIDL thread: https://github.com/heycam/webidl/issues/254 The spec currently describes what the current patch is implementing. But the end goal is that maplike would be shielded from Map prototype changes. Hum, I think I would prefer that maplike functions do not return any MapIterator. That way, we could implement map like without any backing map.
youenn fablet
Comment 47 2017-02-27 17:11:31 PST
Created attachment 302895 [details] Patch for landing
youenn fablet
Comment 48 2017-02-27 17:13:23 PST
(In reply to comment #47) > Created attachment 302895 [details] > Patch for landing Patch does not include prototype change shielding. I'll do that as a follow-up and will add tests for it.
WebKit Commit Bot
Comment 49 2017-02-27 17:36:27 PST
Comment on attachment 302895 [details] Patch for landing Clearing flags on attachment: 302895 Committed r213108: <http://trac.webkit.org/changeset/213108>
WebKit Commit Bot
Comment 50 2017-02-27 17:36:35 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.