From 5201f8a31ffcaab30618ecedb5894f53364316a0 Mon Sep 17 00:00:00 2001 From: Piotr Dabrowski Date: Tue, 30 Dec 2014 11:45:22 +0100 Subject: [PATCH] [Messaging] MessageStorage::removeConversations: check 'conversations' array for elements' types Change-Id: I0bfd0d1bcf93f35ac729bf76637b01f64a41b19e Signed-off-by: Piotr Dabrowski --- src/messaging/messaging_api.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/messaging/messaging_api.js b/src/messaging/messaging_api.js index 4442fd2..be56a96 100644 --- a/src/messaging/messaging_api.js +++ b/src/messaging/messaging_api.js @@ -920,6 +920,12 @@ MessageStorage.prototype.removeConversations = function () { {name: 'errorCallback', type: types_.FUNCTION, optional: true, nullable: true} ]); + args.conversations.forEach(function (el) { + if (!el || el.constructor !== MessageConversation) { + throw new tizen.WebAPIException(tizen.WebAPIException.TYPE_MISMATCH_ERR); + } + }); + var self = this; bridge.async({ -- 2.7.4