mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix FUEL bustage from bug 331654, patch on bug 380168.
This commit is contained in:
parent
501fbf8e09
commit
46f1d98d38
@ -776,43 +776,11 @@ Annotations.prototype = {
|
||||
},
|
||||
|
||||
get : function(aName) {
|
||||
var value = null;
|
||||
var type = Utilities.annotations.getItemAnnotationType(this._id, aName);
|
||||
switch (type) {
|
||||
case Ci.nsIAnnotationService.TYPE_INT32:
|
||||
value = Utilities.annotations.getItemAnnotationInt32(this._id, aName);
|
||||
break;
|
||||
case Ci.nsIAnnotationService.TYPE_INT64:
|
||||
value = Utilities.annotations.getItemAnnotationInt64(this._id, aName);
|
||||
break;
|
||||
case Ci.nsIAnnotationService.TYPE_DOUBLE:
|
||||
value = Utilities.annotations.getItemAnnotationDouble(this._id, aName);
|
||||
break;
|
||||
case Ci.nsIAnnotationService.TYPE_STRING:
|
||||
value = Utilities.annotations.getItemAnnotationString(this._id, aName);
|
||||
break;
|
||||
default:
|
||||
throw("Unknown annotation type specified.");
|
||||
}
|
||||
return value;
|
||||
return Utilities.annotations.getItemAnnotation(this._id, aName);
|
||||
},
|
||||
|
||||
set : function(aName, aValue, aExpiration) {
|
||||
var type = aValue != null ? aValue.constructor.name : "";
|
||||
|
||||
switch (type) {
|
||||
case "String":
|
||||
Utilities.annotations.setItemAnnotationString(this._id, aName, aValue, 0, aExpiration);
|
||||
break;
|
||||
case "Boolean":
|
||||
Utilities.annotations.setItemAnnotationInt32(this._id, aName, aValue, 0, aExpiration);
|
||||
break;
|
||||
case "Number":
|
||||
Utilities.annotations.setItemAnnotationDouble(this._id, aName, aValue, 0, aExpiration);
|
||||
break;
|
||||
default:
|
||||
throw("Unknown annotation value specified.");
|
||||
}
|
||||
Utilities.annotations.setItemAnnotation(this._id, aName, aValue, 0, aExpiration);
|
||||
},
|
||||
|
||||
remove : function(aName) {
|
||||
|
Loading…
Reference in New Issue
Block a user