[6.0] Replace deprecated validateMethod with validateArgs 17/233717/3
authorArkadiusz Pietraszek <a.pietraszek@samsung.com>
Mon, 4 May 2020 12:03:12 +0000 (14:03 +0200)
committerArkadiusz Pietraszek <a.pietraszek@samsung.com>
Tue, 14 Jul 2020 09:21:54 +0000 (11:21 +0200)
https://code.sec.samsung.net/jira/browse/XWALK-2102

Changed modules:
alarm
application
humanactivitymonitor
inputdevice
iotcon
playerutil
power
time
tvinputdevice
widgetservice

[verification]
tct-pass rate did not change.
It is 100% for all changed modules, except playerutil, that crashes after argument validation.
Related task: https://code.sec.samsung.net/jira/browse/TSIX-3440

Change-Id: I805e92857cea9da7580c2bd3117227b1a5abb514
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
src/alarm/alarm_api.js
src/application/application_api.js
src/humanactivitymonitor/humanactivitymonitor_api.js
src/inputdevice/inputdevice_api.js
src/iotcon/iotcon_api.js
src/playerutil/playerutil_api.js
src/power/power_api.js
src/time/time_api.js
src/tvinputdevice/tvinputdevice_api.js
src/widgetservice/widgetservice_api.js

index b19875c..d7ff0da 100755 (executable)
@@ -84,7 +84,7 @@ var _warningLogs = new LogManager();
 
 //class AlarmManager ////////////////////////////////////////////////////
 AlarmManager.prototype.add = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'alarm',
             type: AV.Types.PLATFORM_OBJECT,
@@ -134,7 +134,7 @@ AlarmManager.prototype.add = function() {
 };
 
 AlarmManager.prototype.addAlarmNotification = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'alarm',
             type: AV.Types.PLATFORM_OBJECT,
@@ -177,7 +177,7 @@ AlarmManager.prototype.addAlarmNotification = function() {
 };
 
 AlarmManager.prototype.remove = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING
@@ -200,7 +200,7 @@ AlarmManager.prototype.removeAll = function() {
 };
 
 AlarmManager.prototype.get = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING
@@ -277,7 +277,7 @@ function _prepareDetailInfo(noti) {
 }
 
 AlarmManager.prototype.getAlarmNotification = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING
index 9859957..7414e12 100755 (executable)
@@ -125,7 +125,7 @@ ApplicationManager.prototype.getCurrentApplication = function() {
 };
 
 ApplicationManager.prototype.kill = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'contextId',
             type: AV.Types.STRING
@@ -164,7 +164,7 @@ ApplicationManager.prototype.kill = function() {
 };
 
 ApplicationManager.prototype.launch = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING
@@ -198,7 +198,7 @@ ApplicationManager.prototype.launch = function() {
 };
 
 ApplicationManager.prototype.launchAppControl = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'appControl',
             type: AV.Types.PLATFORM_OBJECT,
@@ -272,7 +272,7 @@ ApplicationManager.prototype.launchAppControl = function() {
 };
 
 ApplicationManager.prototype.findAppControl = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'appControl',
             type: AV.Types.PLATFORM_OBJECT,
@@ -311,7 +311,7 @@ ApplicationManager.prototype.findAppControl = function() {
 };
 
 ApplicationManager.prototype.getAppsContext = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION
@@ -345,7 +345,7 @@ ApplicationManager.prototype.getAppsContext = function() {
 };
 
 ApplicationManager.prototype.getAppContext = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'contextId',
             type: AV.Types.STRING,
@@ -370,7 +370,7 @@ ApplicationManager.prototype.getAppContext = function() {
 };
 
 ApplicationManager.prototype.getAppsInfo = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION
@@ -403,7 +403,7 @@ ApplicationManager.prototype.getAppsInfo = function() {
 };
 
 ApplicationManager.prototype.getAppInfo = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING,
@@ -428,7 +428,7 @@ ApplicationManager.prototype.getAppInfo = function() {
 };
 
 ApplicationManager.prototype.getAppCerts = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING,
@@ -458,7 +458,7 @@ ApplicationManager.prototype.getAppCerts = function() {
 };
 
 ApplicationManager.prototype.getAppSharedURI = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING,
@@ -483,7 +483,7 @@ ApplicationManager.prototype.getAppSharedURI = function() {
 };
 
 ApplicationManager.prototype.getAppMetaData = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'id',
             type: AV.Types.STRING,
@@ -513,7 +513,7 @@ ApplicationManager.prototype.getAppMetaData = function() {
 };
 
 ApplicationManager.prototype.getBatteryUsageInfo = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION
@@ -568,7 +568,7 @@ ApplicationManager.prototype.getBatteryUsageInfo = function() {
 };
 
 ApplicationManager.prototype.getAppsUsageInfo = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION
@@ -753,7 +753,7 @@ ApplicationManager.prototype.addAppInfoEventListener = function() {
             'Use tizen.package.setPackageInfoEventListener() instead.'
     );
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'eventCallback',
             type: AV.Types.LISTENER,
@@ -771,7 +771,7 @@ ApplicationManager.prototype.removeAppInfoEventListener = function() {
             'Use tizen.package.unsetPackageInfoEventListener() instead.'
     );
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'watchId',
             type: AV.Types.LONG
@@ -857,7 +857,7 @@ var appStatusChangeListener = new StatusListenerManager(
 );
 
 ApplicationManager.prototype.addAppStatusChangeListener = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'statusChangeListener',
             type: AV.Types.FUNCTION
@@ -881,7 +881,7 @@ ApplicationManager.prototype.addAppStatusChangeListener = function() {
 };
 
 ApplicationManager.prototype.removeAppStatusChangeListener = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'watchId',
             type: AV.Types.LONG
@@ -1053,7 +1053,7 @@ Application.prototype.removeEventListener = function(watchId) {
 };
 
 Application.prototype.broadcastEvent = function(event, data) {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         { name: 'event', type: AV.Types.DICTIONARY },
         { name: 'data', type: AV.Types.DICTIONARY }
     ]);
@@ -1073,7 +1073,7 @@ Application.prototype.broadcastEvent = function(event, data) {
 };
 
 Application.prototype.broadcastTrustedEvent = function(event, data) {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         { name: 'event', type: AV.Types.DICTIONARY },
         { name: 'data', type: AV.Types.DICTIONARY }
     ]);
@@ -1359,7 +1359,7 @@ function RequestedApplicationControl(data) {
 }
 
 RequestedApplicationControl.prototype.replyResult = function() {
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'data',
             type: AV.Types.ARRAY,
index e0b7fa1..b849792 100755 (executable)
@@ -698,7 +698,7 @@ HumanActivityMonitorManager.prototype.readRecorderData = function() {
 };
 
 HumanActivityMonitorManager.prototype.isGestureSupported = function() {
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'type',
             type: types_.ENUM,
@@ -831,7 +831,7 @@ var gestureRecognitionListener = new GestureListenerManager(
 );
 
 HumanActivityMonitorManager.prototype.addGestureRecognitionListener = function() {
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'type',
             type: types_.ENUM,
@@ -864,7 +864,7 @@ HumanActivityMonitorManager.prototype.addGestureRecognitionListener = function()
 };
 
 HumanActivityMonitorManager.prototype.removeGestureRecognitionListener = function() {
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'watchId',
             type: types_.LONG
@@ -935,7 +935,7 @@ var stressMonitorListener = new StressMonitorListenerManager();
 HumanActivityMonitorManager.prototype.addStressMonitorChangeListener = function() {
     utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR);
     utils_.checkPrivilegeAccess(privilege_.HEALTHINFO);
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'ranges',
             type: types_.ARRAY,
@@ -952,7 +952,7 @@ HumanActivityMonitorManager.prototype.addStressMonitorChangeListener = function(
 
 HumanActivityMonitorManager.prototype.removeStressMonitorChangeListener = function() {
     utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR);
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'watchId',
             type: types_.LONG
index 063a99f..c9ba8cf 100644 (file)
@@ -139,7 +139,7 @@ InputDeviceManager.prototype.unregisterKey = function(keyName) {
 };
 
 InputDeviceManager.prototype.registerKeyBatch = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'keyNames',
             type: types.ARRAY,
@@ -194,7 +194,7 @@ InputDeviceManager.prototype.registerKeyBatch = function() {
 };
 
 InputDeviceManager.prototype.unregisterKeyBatch = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'keyNames',
             type: types.ARRAY,
index e6a26c4..954068d 100644 (file)
@@ -335,7 +335,7 @@ function Resource(data) {
 }
 
 Resource.prototype.notify = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'qos',
             type: types.ENUM,
@@ -373,7 +373,7 @@ Resource.prototype.notify = function() {
 };
 
 Resource.prototype.addResourceTypes = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'types',
             type: types.ARRAY,
@@ -397,7 +397,7 @@ Resource.prototype.addResourceTypes = function() {
 };
 
 Resource.prototype.addResourceInterface = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'iface',
             type: types.STRING
@@ -420,7 +420,7 @@ Resource.prototype.addResourceInterface = function() {
 };
 
 Resource.prototype.addChildResource = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'resource',
             type: types.PLATFORM_OBJECT,
@@ -444,7 +444,7 @@ Resource.prototype.addChildResource = function() {
 };
 
 Resource.prototype.removeChildResource = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'resource',
             type: types.PLATFORM_OBJECT,
@@ -521,7 +521,7 @@ var _setRequestListener = function(id, args_listener) {
 };
 
 Resource.prototype.setRequestListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'listener',
             type: types.LISTENER,
@@ -749,7 +749,7 @@ function RemoteResource(data) {
 }
 
 RemoteResource.prototype.methodGet = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'responseCallback',
             type: types.FUNCTION
@@ -793,7 +793,7 @@ RemoteResource.prototype.methodGet = function() {
 };
 
 RemoteResource.prototype.methodPut = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'representation',
             type: types.PLATFORM_OBJECT,
@@ -843,7 +843,7 @@ RemoteResource.prototype.methodPut = function() {
 };
 
 RemoteResource.prototype.methodPost = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'representation',
             type: types.PLATFORM_OBJECT,
@@ -893,7 +893,7 @@ RemoteResource.prototype.methodPost = function() {
 };
 
 RemoteResource.prototype.methodDelete = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'responseCallback',
             type: types.FUNCTION
@@ -930,7 +930,7 @@ RemoteResource.prototype.methodDelete = function() {
 var resourceChangeListener = createListener('RemoteResourceChangeListener');
 
 RemoteResource.prototype.startObserving = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'observePolicy',
             type: types.ENUM,
@@ -987,7 +987,7 @@ RemoteResource.prototype.stopObserving = function() {
 var cacheChangeListener = createListener('RemoteResourceCacheChangeListener');
 
 RemoteResource.prototype.startCaching = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: types.FUNCTION,
@@ -1028,7 +1028,7 @@ RemoteResource.prototype.stopCaching = function() {
 var resourceStateChangeListener = createListener('RemoteResourceStateChangeListener');
 
 RemoteResource.prototype.setResourceStateChangeListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: types.FUNCTION
@@ -1076,7 +1076,7 @@ var findResourceListener = createListener('FindResourceListener');
 var globalFindResourceId = 0;
 
 Client.prototype.findResource = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'hostAddress',
             type: types.STRING,
@@ -1132,7 +1132,7 @@ var presenceEventListener = createListener('PresenceEventListener', function(res
 });
 
 Client.prototype.addPresenceEventListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'hostAddress',
             type: types.STRING,
@@ -1171,7 +1171,7 @@ Client.prototype.addPresenceEventListener = function() {
 };
 
 Client.prototype.removePresenceEventListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'watchId',
             type: types.LONG
@@ -1193,7 +1193,7 @@ Client.prototype.removePresenceEventListener = function() {
 var findDeviceInfoListener = createListener('FindDeviceInfoListener');
 var globalFindDeviceInfoId = 0;
 Client.prototype.findDeviceInfo = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'hostAddress',
             type: types.STRING,
@@ -1247,7 +1247,7 @@ Client.prototype.findDeviceInfo = function() {
 var findPlatformInfoListener = createListener('FindPlatformInfoListener');
 var globalFindPlatformInfoId = 0;
 Client.prototype.findPlatformInfo = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'hostAddress',
             type: types.STRING,
@@ -1303,7 +1303,7 @@ function Server() {}
 var serverResources = {};
 
 Server.prototype.createResource = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'uriPath',
             type: types.STRING
@@ -1351,7 +1351,7 @@ Server.prototype.createResource = function() {
 };
 
 Server.prototype.removeResource = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'resource',
             type: types.PLATFORM_OBJECT,
@@ -1384,7 +1384,7 @@ Server.prototype.getResources = function() {
 };
 
 Server.prototype.startPresence = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'timeToLive',
             type: types.UNSIGNED_LONG
@@ -1439,7 +1439,7 @@ function Iotcon() {
 }
 
 Iotcon.prototype.initialize = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'filePath',
             type: types.STRING
@@ -1476,7 +1476,7 @@ Iotcon.prototype.getTimeout = function() {
 };
 
 Iotcon.prototype.setTimeout = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'timeout',
             type: types.LONG
@@ -1501,7 +1501,7 @@ var generatedPinListener = createListener(
 );
 
 Iotcon.prototype.addGeneratedPinListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: types.FUNCTION
@@ -1520,7 +1520,7 @@ Iotcon.prototype.addGeneratedPinListener = function() {
 };
 
 Iotcon.prototype.removeGeneratedPinListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'watchId',
             type: types.LONG
index bb59776..c9bc4ce 100644 (file)
@@ -38,7 +38,7 @@ PlayerUtil.prototype.getLatencyMode = function() {
 };
 
 PlayerUtil.prototype.setLatencyMode = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'latencyMode',
             type: types.ENUM,
index baa1333..4df7828 100755 (executable)
@@ -89,7 +89,7 @@ function PowerManager() {
  *     is desired to be.
  */
 PowerManager.prototype.request = function() {
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'resource',
             type: types_.ENUM,
@@ -136,7 +136,7 @@ PowerManager.prototype.request = function() {
  *     be removed.
  */
 PowerManager.prototype.release = function() {
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'resource',
             type: types_.ENUM,
index 1531f61..1ea4930 100644 (file)
@@ -209,7 +209,7 @@ tizen.TZDate.prototype.getDate = function() {
 };
 
 function _updateTZDate(tzdate, args, param, func) {
-    var a = validator_.validateMethod(args, [
+    var a = validator_.validateArgs(args, [
         {
             name: param,
             type: validator_.Types.LONG
@@ -228,7 +228,7 @@ function _updateTZDate(tzdate, args, param, func) {
 }
 
 function _updateTZDateUTC(tzdate, args, param, func) {
-    var a = validator_.validateMethod(args, [
+    var a = validator_.validateArgs(args, [
         {
             name: param,
             type: validator_.Types.LONG
@@ -391,7 +391,7 @@ tizen.TZDate.prototype.getTimezone = function() {
 
 tizen.TZDate.prototype.toTimezone = function() {
     utils_.log('Entered TZDate.toTimezone');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'timezone',
             type: validator_.Types.STRING
@@ -412,7 +412,7 @@ tizen.TZDate.prototype.toUTC = function() {
 
 tizen.TZDate.prototype.difference = function() {
     utils_.log('Entered TZDate.difference');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -430,7 +430,7 @@ tizen.TZDate.prototype.difference = function() {
 
 tizen.TZDate.prototype.equalsTo = function() {
     utils_.log('Entered TZDate.equalsTo');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -442,7 +442,7 @@ tizen.TZDate.prototype.equalsTo = function() {
 
 tizen.TZDate.prototype.earlierThan = function() {
     utils_.log('Entered TZDate.earlierThan');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -454,7 +454,7 @@ tizen.TZDate.prototype.earlierThan = function() {
 
 tizen.TZDate.prototype.laterThan = function() {
     utils_.log('Entered TZDate.laterThan');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -466,7 +466,7 @@ tizen.TZDate.prototype.laterThan = function() {
 
 tizen.TZDate.prototype.addDuration = function() {
     utils_.log('Entered TZDate.addDuration');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'duration',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -724,7 +724,7 @@ tizen.TimeDuration = function(length, unit) {
 tizen.TimeDuration.prototype.difference = function() {
     utils_.log('Entered TimeDuration.difference');
 
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -744,7 +744,7 @@ tizen.TimeDuration.prototype.difference = function() {
 tizen.TimeDuration.prototype.equalsTo = function() {
     utils_.log('Entered TimeDuration.equalsTo');
 
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -764,7 +764,7 @@ tizen.TimeDuration.prototype.equalsTo = function() {
 tizen.TimeDuration.prototype.lessThan = function() {
     utils_.log('Entered TimeDuration.lessThan');
 
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -784,7 +784,7 @@ tizen.TimeDuration.prototype.lessThan = function() {
 tizen.TimeDuration.prototype.greaterThan = function() {
     utils_.log('Entered TimeDuration.greaterThan');
 
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'other',
             type: validator_.Types.PLATFORM_OBJECT,
@@ -834,7 +834,7 @@ exports.getAvailableTimezones = function() {
 exports.getDateFormat = function() {
     utils_.log('Entered TimeUtil.getDateFormat');
 
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'shortformat',
             type: validator_.Types.BOOLEAN,
@@ -868,7 +868,7 @@ exports.getTimeFormat = function() {
 exports.isLeapYear = function() {
     utils_.log('Entered TimeUtil.isLeapYear');
 
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'year',
             type: validator_.Types.LONG
@@ -887,7 +887,7 @@ function _timeChangedListenerCallback(eventObj) {
 
 exports.setDateTimeChangeListener = function() {
     utils_.log('Entered TimeUtil.setDateTimeChangeListener');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'changeCallback',
             type: validator_.Types.FUNCTION
@@ -919,7 +919,7 @@ function _timezoneListenerCallback(eventObj) {
 
 exports.setTimezoneChangeListener = function() {
     utils_.log('Entered TimeUtil.setTimezoneChangeListener');
-    var args = validator_.validateMethod(arguments, [
+    var args = validator_.validateArgs(arguments, [
         {
             name: 'changeCallback',
             type: validator_.Types.FUNCTION
index bda5d75..d960002 100755 (executable)
@@ -352,7 +352,7 @@ TVInputDeviceManager.prototype.unregisterKey = function(keyName) {
 
 TVInputDeviceManager.prototype.registerKeyBatch = function() {
     xwalk.utils.checkPrivilegeAccess(xwalk.utils.privilege.TV_INPUT_DEVICE);
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'keyNames',
             type: types.ARRAY,
@@ -408,7 +408,7 @@ TVInputDeviceManager.prototype.registerKeyBatch = function() {
 
 TVInputDeviceManager.prototype.unregisterKeyBatch = function() {
     xwalk.utils.checkPrivilegeAccess(xwalk.utils.privilege.TV_INPUT_DEVICE);
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'keyNames',
             type: types.ARRAY,
index 53b5a15..a0831fd 100644 (file)
@@ -118,7 +118,7 @@ function WidgetInstance(data, widget) {
 }
 
 WidgetInstance.prototype.changeUpdatePeriod = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'seconds',
             type: types.DOUBLE
@@ -138,7 +138,7 @@ WidgetInstance.prototype.changeUpdatePeriod = function() {
 };
 
 WidgetInstance.prototype.sendContent = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'data',
             type: types.DICTIONARY
@@ -163,7 +163,7 @@ WidgetInstance.prototype.sendContent = function() {
 };
 
 WidgetInstance.prototype.getContent = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: types.FUNCTION
@@ -231,7 +231,7 @@ function Widget(data) {
 }
 
 Widget.prototype.getName = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'locale',
             type: types.STRING,
@@ -257,7 +257,7 @@ Widget.prototype.getName = function() {
 };
 
 Widget.prototype.getInstances = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: types.FUNCTION
@@ -289,7 +289,7 @@ Widget.prototype.getInstances = function() {
 };
 
 Widget.prototype.getVariant = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'sizeType',
             type: types.ENUM,
@@ -311,7 +311,7 @@ Widget.prototype.getVariant = function() {
 };
 
 Widget.prototype.getVariants = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: types.FUNCTION
@@ -343,7 +343,7 @@ Widget.prototype.getVariants = function() {
 };
 
 Widget.prototype.addStateChangeListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'eventCallback',
             type: types.FUNCTION
@@ -370,7 +370,7 @@ Widget.prototype.addStateChangeListener = function() {
 };
 
 Widget.prototype.removeStateChangeListener = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'watchId',
             type: types.LONG
@@ -391,7 +391,7 @@ Widget.prototype.removeStateChangeListener = function() {
 function WidgetServiceManager() {}
 
 WidgetServiceManager.prototype.getWidget = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'widgetId',
             type: types.STRING
@@ -411,7 +411,7 @@ WidgetServiceManager.prototype.getWidget = function() {
 };
 
 WidgetServiceManager.prototype.getWidgets = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: types.FUNCTION
@@ -451,7 +451,7 @@ WidgetServiceManager.prototype.getWidgets = function() {
 };
 
 WidgetServiceManager.prototype.getPrimaryWidgetId = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'id',
             type: types.STRING
@@ -471,7 +471,7 @@ WidgetServiceManager.prototype.getPrimaryWidgetId = function() {
 };
 
 WidgetServiceManager.prototype.getSize = function() {
-    var args = validator.validateMethod(arguments, [
+    var args = validator.validateArgs(arguments, [
         {
             name: 'sizeType',
             type: types.ENUM,