[download] Throw TypeError when Constructor called as function
authorDeqing Huang <deqing.huang@intel.com>
Fri, 11 Apr 2014 08:31:16 +0000 (16:31 +0800)
committerDeqing Huang <deqing.huang@intel.com>
Fri, 11 Apr 2014 09:13:41 +0000 (17:13 +0800)
BUG=https://crosswalk-project.org/jira/browse/xwalk-959

download/download_api.js

index 259dc86..817fc2a 100644 (file)
@@ -226,7 +226,7 @@ tizen.DownloadRequest = function(url, destination, fileName, networkType) {
   this.url_ = url;
 
   if (!(this instanceof tizen.DownloadRequest)) {
-    throw new tizen.WebAPIException(tizen.WebAPIException.TYPE_MISMATCH_ERR);
+    throw new TypeError;
   }
   this.uid = ++currentUID;
   this.destination = asValidString(destination);