Bug 159287 - REGRESSION(200114): Netflix app does not see ChromeCast
Summary: REGRESSION(200114): Netflix app does not see ChromeCast
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-29 18:19 PDT by Michael Saboff
Modified: 2016-06-29 21:47 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.95 KB, patch)
2016-06-29 18:30 PDT, Michael Saboff
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2016-06-29 18:19:00 PDT
We are dying in the following function:
t = function() {
    var e = g.defer(),
        a = this,
        f = a.config.appId;
    n.info.always("Initializing Cast SDK - Version: " + NFGCKFrameworkVersion + " - AppId: " + f); 
    var h = c.processIflist(nrdp.device.iflist);
    a.networkId = c.networkIdFromInterface(h), l.forEach(o, function(b) {
        b.handler = b.handler.bind(a), nrdp.device.addEventListener(b.name, b.handler)
    }); 
    var i = NFGCKFilterCriteria.criteriaForAvailableApplicationWithID(f);
    return NFGCKDeviceScanner.initWithFilterCriteria(i, function(c) {
        return c ? (d = c, b = NFGCKDeviceScannerListener.init(), b.didComeOnline = v.bind(a), b.didGoOffline = r.bind(a), b.didChange = s.bind(a), d.addListener(b), d.startScan(), void e.resolve()) : void e.reject(new m(m.ERRORS.START_ERROR, "No cast scanner instance"))
    }), e.promise
}

We are dying because there is no initWithFilterCriteria property on NFGCKDeviceScanner.  This looks like this is an inadvertent result of change set <http://trac.webkit.org/changeset/200114>.
Comment 1 Michael Saboff 2016-06-29 18:19:26 PDT
<rdar://problem/26878852>
Comment 2 Michael Saboff 2016-06-29 18:30:48 PDT
Created attachment 282401 [details]
Patch
Comment 3 Benjamin Poulain 2016-06-29 19:24:18 PDT
Comment on attachment 282401 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=282401&action=review

I would really like an explanation of the actual bug in the ChangeLog or in Radar.

I have an hypothesis as to why the dyld_get_program_sdk_version() was failing but I can't find if my hypothesis holds from this changelog or radar. This should be documented IMHO.

> Source/JavaScriptCore/API/JSWrapperMap.mm:665
> +    static int32_t versionOfLinkTimeJavaScriptCore = 0;
> +    if (!versionOfLinkTimeJavaScriptCore)

Looks like something that should use dispatch_once().

> Source/JavaScriptCore/API/JSWrapperMap.mm:667
> +    // Only do the link time version comparision if we linked directly with JavaScriptCore

Typo: comparision
Comment 4 Michael Saboff 2016-06-29 21:30:43 PDT
(In reply to comment #3)
> Comment on attachment 282401 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282401&action=review
> 
> I would really like an explanation of the actual bug in the ChangeLog or in
> Radar.

Added.

> I have an hypothesis as to why the dyld_get_program_sdk_version() was
> failing but I can't find if my hypothesis holds from this changelog or
> radar. This should be documented IMHO.
> 
> > Source/JavaScriptCore/API/JSWrapperMap.mm:665
> > +    static int32_t versionOfLinkTimeJavaScriptCore = 0;
> > +    if (!versionOfLinkTimeJavaScriptCore)
> 
> Looks like something that should use dispatch_once().
> 
> > Source/JavaScriptCore/API/JSWrapperMap.mm:667
> > +    // Only do the link time version comparision if we linked directly with JavaScriptCore
> 
> Typo: comparision

Fixed.
Comment 5 Michael Saboff 2016-06-29 21:47:15 PDT
Committed r202670: <http://trac.webkit.org/changeset/202670>