Exclude the webkitGetUserMedia method from the test until it is supported by most platforms. Once this happens, the expected behaviour for this method is to throw an exception when invoked with no arguments.
Created attachment 89408 [details] Patch
Comment on attachment 89408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=89408&action=review > LayoutTests/fast/dom/navigator-detached-no-crash.html:56 > + if (p != 'webkitGetUserMedia') { // Don't include the Media Stream API functions until most platforms have support. Can you combine this logic with the existing check for "geolocation" into some common check? Maybe you can keep an excluding list and check this list in for loop.
Created attachment 89412 [details] Patch
Comment on attachment 89408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=89408&action=review >> LayoutTests/fast/dom/navigator-detached-no-crash.html:56 >> + if (p != 'webkitGetUserMedia') { // Don't include the Media Stream API functions until most platforms have support. > > Can you combine this logic with the existing check for "geolocation" into some common check? Maybe you can keep an excluding list and check this list in for loop. Fixed.
Comment on attachment 89412 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=89412&action=review > LayoutTests/fast/dom/navigator-detached-no-crash.html:55 > + if (p != 'geolocation' && p != 'webkitGetUserMedia') { // Don't include Geolocation or the Media Stream API functions until most platforms have support. Better to use early return, like: if (p == 'geolocation' || p == 'webkitGetUserMedia') //... continue; ...
Created attachment 89417 [details] Patch
Comment on attachment 89412 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=89412&action=review >> LayoutTests/fast/dom/navigator-detached-no-crash.html:55 >> + if (p != 'geolocation' && p != 'webkitGetUserMedia') { // Don't include Geolocation or the Media Stream API functions until most platforms have support. > > Better to use early return, like: > if (p == 'geolocation' || p == 'webkitGetUserMedia') //... > continue; > ... Fixed.
Committed as https://trac.webkit.org/changeset/83754.