Index: extensions/renderer/resources/set_icon.js |
diff --git a/extensions/renderer/resources/set_icon.js b/extensions/renderer/resources/set_icon.js |
index 883fd673997f849eaef0dc3514f6291131dadfb6..7c02842d9ae7c5e554d6e9dbc721e3e869d29544 100644 |
--- a/extensions/renderer/resources/set_icon.js |
+++ b/extensions/renderer/resources/set_icon.js |
@@ -36,14 +36,14 @@ function verifyImageData(imageData, iconSize) { |
if (!('width' in imageData) || |
!('height' in imageData) || |
!('data' in imageData)) { |
- throw new Error( |
+ throw new $Error.self( |
'The imageData property must contain an ImageData object or' + |
' dictionary of ImageData objects.'); |
} |
if (imageData.width > iconSize || |
imageData.height > iconSize) { |
- throw new Error( |
+ throw new $Error.self( |
'The imageData property must contain an ImageData object that ' + |
'is no larger than ' + iconSize + ' pixels square.'); |
} |
@@ -79,7 +79,7 @@ function setIcon(details, callback, name, parameters, actionType) { |
{nativeFunction: SetIconCommon}); |
} |
} else { |
- throw new Error('imageData property has unexpected type.'); |
+ throw new $Error.self('imageData property has unexpected type.'); |
} |
} else if ('path' in details) { |
if (typeof details.path == 'object') { |
@@ -89,7 +89,7 @@ function setIcon(details, callback, name, parameters, actionType) { |
if (index == iconSizes.length) { |
delete details.path; |
if (isEmpty) |
- throw new Error('The path property must not be empty.'); |
+ throw new $Error.self('The path property must not be empty.'); |
sendRequest(name, [details, callback], parameters, |
{nativeFunction: SetIconCommon}); |
return; |
@@ -119,11 +119,11 @@ function setIcon(details, callback, name, parameters, actionType) { |
{nativeFunction: SetIconCommon}); |
}); |
} else { |
- throw new Error('The path property should contain either string or ' + |
- 'dictionary of strings.'); |
+ throw new $Error.self('The path property should contain either string ' + |
+ 'or dictionary of strings.'); |
} |
} else { |
- throw new Error( |
+ throw new $Error.self( |
not at google - send to devlin
2014/08/19 16:45:56
new Error() for this whole file
(which is horribl
|
'Either the path or imageData property must be specified.'); |
} |
} |