cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-8425) Media plugin .ctr: improve check for required params as per spec
Date Wed, 04 Feb 2015 18:26:34 GMT

     [ https://issues.apache.org/jira/browse/CB-8425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Grebnov updated CB-8425:
-------------------------------
    Description: 
As per documentation src is a mandatory but in argscheck it is optional. Due to this in some
unit tests 'undefined' is passed to native proxy and may cause some issues (for example I
see related internal errors on Windows)

var Media = function(src, successCallback, errorCallback, statusCallback) {
    argscheck.checkArgs('SFFF', 'Media', arguments);
    this.id = utils.createUUID();
    mediaObjects[this.id] = this;
    this.src = src;
...
    exec(null, this.errorCallback, "Media", "create", [this.id, this.src]);
}

  was:
As per documentation src and successCallback must be mandatory but argscheck is incorrect.

var Media = function(src, successCallback, errorCallback, statusCallback) {
    argscheck.checkArgs('SFFF', 'Media', arguments);
    this.id = utils.createUUID();
    mediaObjects[this.id] = this;
    this.src = src;
...
    exec(null, this.errorCallback, "Media", "create", [this.id, this.src]);
}


> Media plugin .ctr: improve check for required params as per spec
> ----------------------------------------------------------------
>
>                 Key: CB-8425
>                 URL: https://issues.apache.org/jira/browse/CB-8425
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media
>            Reporter: Sergey Grebnov
>            Assignee: Sergey Grebnov
>              Labels: cordova-plugin-media
>
> As per documentation src is a mandatory but in argscheck it is optional. Due to this
in some unit tests 'undefined' is passed to native proxy and may cause some issues (for example
I see related internal errors on Windows)
> var Media = function(src, successCallback, errorCallback, statusCallback) {
>     argscheck.checkArgs('SFFF', 'Media', arguments);
>     this.id = utils.createUUID();
>     mediaObjects[this.id] = this;
>     this.src = src;
> ...
>     exec(null, this.errorCallback, "Media", "create", [this.id, this.src]);
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message