From: Lukasz Bardeli Date: Mon, 20 Apr 2015 11:46:23 +0000 (+0200) Subject: [Common] fix in WebAPIException X-Git-Tag: submit/tizen_tv/20150603.064601~1^2~146 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f571da144c45a7ac127fb08e2fb38f94a134fa4;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Common] fix in WebAPIException [Feature] Adaptation to documentation. readonly unsigned short code 16-bit error code. For the possible values of this attribute, see DOMException. DOMException - http://www.w3.org/TR/dom/#domexception The code exception field must return the value it was initialized to. To throw a name exception run these steps: 1. Let code be zero. 2. If name is in the first column of the error names table and has a corresponding legacy code exception field value in the third column, set code to that value. 3. Throw a new DOMException exception, whose message is a user agent-defined value, name is name, and whose code exception field is code. Change-Id: Ic14e6855220da2c66d38c50bb6f3439f26d05f0e Signed-off-by: Lukasz Bardeli --- diff --git a/src/utils/utils_api.js b/src/utils/utils_api.js index 1e906cc3..d0df4877 100644 --- a/src/utils/utils_api.js +++ b/src/utils/utils_api.js @@ -1321,6 +1321,10 @@ var WebAPIException = function(code, message, name) { return; } + if (code_ > errors.DATA_CLONE_ERR) { + code_ = 0; + } + // attributes Object.defineProperties(this, { code: {value: code_, writable: false, enumerable: true},