Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge in fixes for bug 689375, bug 698753, and bug 687367 to release …
Browse files Browse the repository at this point in the history
…branch, a=alexk

--HG--
branch : GECKO80_2011103118_RELBRANCH
  • Loading branch information
Brian Smith committed Nov 3, 2011
2 parents 9b3a722 + 517eca7 commit 38e1abc
Show file tree
Hide file tree
Showing 8 changed files with 623 additions and 8 deletions.
2 changes: 0 additions & 2 deletions netwerk/dns/nsHostResolver.cpp
Expand Up @@ -85,8 +85,6 @@ using namespace mozilla;
// ShortIdleTimeoutSeconds of idle time. Smaller pools use LongIdleTimeoutSeconds for a
// timeout period.

#define MAX_NON_PRIORITY_REQUESTS 150

#define HighThreadThreshold MAX_RESOLVER_THREADS_FOR_ANY_PRIORITY
#define LongIdleTimeoutSeconds 300 // for threads 1 -> HighThreadThreshold
#define ShortIdleTimeoutSeconds 60 // for threads HighThreadThreshold+1 -> MAX_RESOLVER_THREADS
Expand Down
12 changes: 12 additions & 0 deletions netwerk/dns/nsHostResolver.h
Expand Up @@ -71,8 +71,20 @@ class nsResolveHostCallback;
return n; \
}

#ifdef ANDROID
// See bug 687367 - pre gingerbread android has race conditions involving stdio.
// stdio is used as part of the getaddrinfo() implementation. In order to reduce
// that race window limit ourselves to 1 lookup at a time on android.

#define MAX_RESOLVER_THREADS_FOR_ANY_PRIORITY 0
#define MAX_RESOLVER_THREADS_FOR_HIGH_PRIORITY 1
#define MAX_NON_PRIORITY_REQUESTS 0
#else
#define MAX_RESOLVER_THREADS_FOR_ANY_PRIORITY 3
#define MAX_RESOLVER_THREADS_FOR_HIGH_PRIORITY 5
#define MAX_NON_PRIORITY_REQUESTS 150
#endif

#define MAX_RESOLVER_THREADS (MAX_RESOLVER_THREADS_FOR_ANY_PRIORITY + \
MAX_RESOLVER_THREADS_FOR_HIGH_PRIORITY)

Expand Down
282 changes: 279 additions & 3 deletions security/nss/lib/ckfw/builtins/certdata.c

Large diffs are not rendered by default.

281 changes: 281 additions & 0 deletions security/nss/lib/ckfw/builtins/certdata.txt
Expand Up @@ -23299,3 +23299,284 @@ CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE

#
# Certificate "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (cyb)"
#
CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
CKA_TOKEN CK_BBOOL CK_TRUE
CKA_PRIVATE CK_BBOOL CK_FALSE
CKA_MODIFIABLE CK_BBOOL CK_FALSE
CKA_LABEL UTF8 "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (cyb)"
CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
CKA_SUBJECT MULTILINE_OCTAL
\060\143\061\013\060\011\006\003\125\004\006\023\002\115\131\061
\033\060\031\006\003\125\004\012\023\022\104\151\147\151\143\145
\162\164\040\123\144\156\056\040\102\150\144\056\061\021\060\017
\006\003\125\004\013\023\010\064\065\067\066\060\070\055\113\061
\044\060\042\006\003\125\004\003\023\033\104\151\147\151\163\151
\147\156\040\123\145\162\166\145\162\040\111\104\040\050\105\156
\162\151\143\150\051
END
CKA_ID UTF8 "0"
CKA_ISSUER MULTILINE_OCTAL
\060\165\061\013\060\011\006\003\125\004\006\023\002\125\123\061
\030\060\026\006\003\125\004\012\023\017\107\124\105\040\103\157
\162\160\157\162\141\164\151\157\156\061\047\060\045\006\003\125
\004\013\023\036\107\124\105\040\103\171\142\145\162\124\162\165
\163\164\040\123\157\154\165\164\151\157\156\163\054\040\111\156
\143\056\061\043\060\041\006\003\125\004\003\023\032\107\124\105
\040\103\171\142\145\162\124\162\165\163\164\040\107\154\157\142
\141\154\040\122\157\157\164
END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\006\007\377\377\377\377\377
END
CKA_VALUE MULTILINE_OCTAL
\060\202\003\315\060\202\003\066\240\003\002\001\002\002\006\007
\377\377\377\377\377\060\015\006\011\052\206\110\206\367\015\001
\001\005\005\000\060\165\061\013\060\011\006\003\125\004\006\023
\002\125\123\061\030\060\026\006\003\125\004\012\023\017\107\124
\105\040\103\157\162\160\157\162\141\164\151\157\156\061\047\060
\045\006\003\125\004\013\023\036\107\124\105\040\103\171\142\145
\162\124\162\165\163\164\040\123\157\154\165\164\151\157\156\163
\054\040\111\156\143\056\061\043\060\041\006\003\125\004\003\023
\032\107\124\105\040\103\171\142\145\162\124\162\165\163\164\040
\107\154\157\142\141\154\040\122\157\157\164\060\036\027\015\060
\067\060\067\061\067\061\065\061\067\064\071\132\027\015\061\062
\060\067\061\067\061\065\061\066\065\065\132\060\143\061\013\060
\011\006\003\125\004\006\023\002\115\131\061\033\060\031\006\003
\125\004\012\023\022\104\151\147\151\143\145\162\164\040\123\144
\156\056\040\102\150\144\056\061\021\060\017\006\003\125\004\013
\023\010\064\065\067\066\060\070\055\113\061\044\060\042\006\003
\125\004\003\023\033\104\151\147\151\163\151\147\156\040\123\145
\162\166\145\162\040\111\104\040\050\105\156\162\151\143\150\051
\060\201\237\060\015\006\011\052\206\110\206\367\015\001\001\001
\005\000\003\201\215\000\060\201\211\002\201\201\000\255\250\144
\113\115\207\307\204\131\271\373\220\106\240\246\211\300\361\376
\325\332\124\202\067\015\231\053\105\046\012\350\126\260\177\312
\250\364\216\107\204\001\202\051\343\263\152\265\221\363\373\225
\205\274\162\250\144\350\012\100\234\305\364\161\256\173\173\152
\007\352\220\024\117\215\211\257\224\253\262\006\324\002\152\173
\230\037\131\271\072\315\124\372\040\337\262\052\012\351\270\335
\151\220\300\051\323\116\320\227\355\146\314\305\031\111\006\177
\372\136\054\174\173\205\033\062\102\337\173\225\045\002\003\001
\000\001\243\202\001\170\060\202\001\164\060\022\006\003\125\035
\023\001\001\377\004\010\060\006\001\001\377\002\001\000\060\134
\006\003\125\035\040\004\125\060\123\060\110\006\011\053\006\001
\004\001\261\076\001\000\060\073\060\071\006\010\053\006\001\005
\005\007\002\001\026\055\150\164\164\160\072\057\057\143\171\142
\145\162\164\162\165\163\164\056\157\155\156\151\162\157\157\164
\056\143\157\155\057\162\145\160\157\163\151\164\157\162\171\056
\143\146\155\060\007\006\005\140\203\112\001\001\060\016\006\003
\125\035\017\001\001\377\004\004\003\002\001\346\060\201\211\006
\003\125\035\043\004\201\201\060\177\241\171\244\167\060\165\061
\013\060\011\006\003\125\004\006\023\002\125\123\061\030\060\026
\006\003\125\004\012\023\017\107\124\105\040\103\157\162\160\157
\162\141\164\151\157\156\061\047\060\045\006\003\125\004\013\023
\036\107\124\105\040\103\171\142\145\162\124\162\165\163\164\040
\123\157\154\165\164\151\157\156\163\054\040\111\156\143\056\061
\043\060\041\006\003\125\004\003\023\032\107\124\105\040\103\171
\142\145\162\124\162\165\163\164\040\107\154\157\142\141\154\040
\122\157\157\164\202\002\001\245\060\105\006\003\125\035\037\004
\076\060\074\060\072\240\070\240\066\206\064\150\164\164\160\072
\057\057\167\167\167\056\160\165\142\154\151\143\055\164\162\165
\163\164\056\143\157\155\057\143\147\151\055\142\151\156\057\103
\122\114\057\062\060\061\070\057\143\144\160\056\143\162\154\060
\035\006\003\125\035\016\004\026\004\024\306\026\223\116\026\027
\354\026\256\214\224\166\363\206\155\305\164\156\204\167\060\015
\006\011\052\206\110\206\367\015\001\001\005\005\000\003\201\201
\000\166\000\173\246\170\053\146\035\216\136\066\306\244\216\005
\362\043\222\174\223\147\323\364\300\012\175\213\055\331\352\325
\157\032\363\341\112\051\132\042\204\115\120\057\113\014\362\377
\205\302\173\125\324\104\202\276\155\254\147\216\274\264\037\222
\234\121\200\032\024\366\156\253\141\210\013\255\034\177\367\113
\120\121\326\145\033\246\107\161\025\136\260\161\363\065\024\362
\067\275\143\310\325\360\223\132\064\137\330\075\350\135\367\305
\036\300\345\317\037\206\044\251\074\007\146\315\301\322\066\143
\131
END

# Trust for Certificate "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (cyb)"
CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
CKA_TOKEN CK_BBOOL CK_TRUE
CKA_PRIVATE CK_BBOOL CK_FALSE
CKA_MODIFIABLE CK_BBOOL CK_FALSE
CKA_LABEL UTF8 "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (cyb)"
CKA_CERT_SHA1_HASH MULTILINE_OCTAL
\125\120\257\354\277\350\303\255\304\013\343\255\014\247\344\025
\214\071\131\117
END
CKA_CERT_MD5_HASH MULTILINE_OCTAL
\322\336\256\120\244\230\055\157\067\267\206\122\310\055\113\152
END
CKA_ISSUER MULTILINE_OCTAL
\060\165\061\013\060\011\006\003\125\004\006\023\002\125\123\061
\030\060\026\006\003\125\004\012\023\017\107\124\105\040\103\157
\162\160\157\162\141\164\151\157\156\061\047\060\045\006\003\125
\004\013\023\036\107\124\105\040\103\171\142\145\162\124\162\165
\163\164\040\123\157\154\165\164\151\157\156\163\054\040\111\156
\143\056\061\043\060\041\006\003\125\004\003\023\032\107\124\105
\040\103\171\142\145\162\124\162\165\163\164\040\107\154\157\142
\141\154\040\122\157\157\164
END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\006\007\377\377\377\377\377
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE

#
# Certificate "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (en)"
#
CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
CKA_TOKEN CK_BBOOL CK_TRUE
CKA_PRIVATE CK_BBOOL CK_FALSE
CKA_MODIFIABLE CK_BBOOL CK_FALSE
CKA_LABEL UTF8 "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (en)"
CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
CKA_SUBJECT MULTILINE_OCTAL
\060\145\061\013\060\011\006\003\125\004\006\023\002\115\131\061
\033\060\031\006\003\125\004\012\023\022\104\151\147\151\143\145
\162\164\040\123\144\156\056\040\102\150\144\056\061\021\060\017
\006\003\125\004\013\023\010\064\065\067\066\060\070\055\113\061
\046\060\044\006\003\125\004\003\023\035\104\151\147\151\163\151
\147\156\040\123\145\162\166\145\162\040\111\104\040\055\040\050
\105\156\162\151\143\150\051
END
CKA_ID UTF8 "0"
CKA_ISSUER MULTILINE_OCTAL
\060\201\264\061\024\060\022\006\003\125\004\012\023\013\105\156
\164\162\165\163\164\056\156\145\164\061\100\060\076\006\003\125
\004\013\024\067\167\167\167\056\145\156\164\162\165\163\164\056
\156\145\164\057\103\120\123\137\062\060\064\070\040\151\156\143
\157\162\160\056\040\142\171\040\162\145\146\056\040\050\154\151
\155\151\164\163\040\154\151\141\142\056\051\061\045\060\043\006
\003\125\004\013\023\034\050\143\051\040\061\071\071\071\040\105
\156\164\162\165\163\164\056\156\145\164\040\114\151\155\151\164
\145\144\061\063\060\061\006\003\125\004\003\023\052\105\156\164
\162\165\163\164\056\156\145\164\040\103\145\162\164\151\146\151
\143\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171
\040\050\062\060\064\070\051
END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\006\007\377\377\377\377\377
END
CKA_VALUE MULTILINE_OCTAL
\060\202\004\320\060\202\003\270\240\003\002\001\002\002\006\007
\377\377\377\377\377\060\015\006\011\052\206\110\206\367\015\001
\001\005\005\000\060\201\264\061\024\060\022\006\003\125\004\012
\023\013\105\156\164\162\165\163\164\056\156\145\164\061\100\060
\076\006\003\125\004\013\024\067\167\167\167\056\145\156\164\162
\165\163\164\056\156\145\164\057\103\120\123\137\062\060\064\070
\040\151\156\143\157\162\160\056\040\142\171\040\162\145\146\056
\040\050\154\151\155\151\164\163\040\154\151\141\142\056\051\061
\045\060\043\006\003\125\004\013\023\034\050\143\051\040\061\071
\071\071\040\105\156\164\162\165\163\164\056\156\145\164\040\114
\151\155\151\164\145\144\061\063\060\061\006\003\125\004\003\023
\052\105\156\164\162\165\163\164\056\156\145\164\040\103\145\162
\164\151\146\151\143\141\164\151\157\156\040\101\165\164\150\157
\162\151\164\171\040\050\062\060\064\070\051\060\036\027\015\061
\060\060\067\061\066\061\067\062\063\063\070\132\027\015\061\065
\060\067\061\066\061\067\065\063\063\070\132\060\145\061\013\060
\011\006\003\125\004\006\023\002\115\131\061\033\060\031\006\003
\125\004\012\023\022\104\151\147\151\143\145\162\164\040\123\144
\156\056\040\102\150\144\056\061\021\060\017\006\003\125\004\013
\023\010\064\065\067\066\060\070\055\113\061\046\060\044\006\003
\125\004\003\023\035\104\151\147\151\163\151\147\156\040\123\145
\162\166\145\162\040\111\104\040\055\040\050\105\156\162\151\143
\150\051\060\202\001\042\060\015\006\011\052\206\110\206\367\015
\001\001\001\005\000\003\202\001\017\000\060\202\001\012\002\202
\001\001\000\305\211\344\364\015\006\100\222\131\307\032\263\065
\321\016\114\052\063\371\370\257\312\236\177\356\271\247\155\140
\364\124\350\157\325\233\363\033\143\061\004\150\162\321\064\026
\214\264\027\054\227\336\163\305\330\220\025\240\032\053\365\313
\263\110\206\104\360\035\210\114\316\101\102\032\357\365\014\336
\376\100\332\071\040\367\006\125\072\152\235\106\301\322\157\245
\262\310\127\076\051\243\234\340\351\205\167\146\350\230\247\044
\176\276\300\131\040\345\104\157\266\127\330\276\316\302\145\167
\130\306\141\101\321\164\004\310\177\111\102\305\162\251\162\026
\356\214\335\022\135\264\112\324\321\257\120\267\330\252\165\166
\150\255\076\135\252\060\155\141\250\253\020\133\076\023\277\063
\340\257\104\235\070\042\133\357\114\057\246\161\046\025\046\312
\050\214\331\372\216\216\251\242\024\065\342\233\044\210\264\364
\177\205\235\203\117\007\241\266\024\220\066\304\064\034\215\046
\141\155\023\157\170\276\350\217\047\307\113\204\226\243\206\150
\014\043\276\013\354\214\224\000\251\004\212\023\220\367\337\205
\154\014\261\002\003\001\000\001\243\202\001\064\060\202\001\060
\060\016\006\003\125\035\017\001\001\377\004\004\003\002\001\006
\060\022\006\003\125\035\023\001\001\377\004\010\060\006\001\001
\377\002\001\000\060\047\006\003\125\035\045\004\040\060\036\006
\010\053\006\001\005\005\007\003\001\006\010\053\006\001\005\005
\007\003\002\006\010\053\006\001\005\005\007\003\004\060\063\006
\010\053\006\001\005\005\007\001\001\004\047\060\045\060\043\006
\010\053\006\001\005\005\007\060\001\206\027\150\164\164\160\072
\057\057\157\143\163\160\056\145\156\164\162\165\163\164\056\156
\145\164\060\104\006\003\125\035\040\004\075\060\073\060\071\006
\005\140\203\112\001\001\060\060\060\056\006\010\053\006\001\005
\005\007\002\001\026\042\150\164\164\160\072\057\057\167\167\167
\056\144\151\147\151\143\145\162\164\056\143\157\155\056\155\171
\057\143\160\163\056\150\164\155\060\062\006\003\125\035\037\004
\053\060\051\060\047\240\045\240\043\206\041\150\164\164\160\072
\057\057\143\162\154\056\145\156\164\162\165\163\164\056\156\145
\164\057\062\060\064\070\143\141\056\143\162\154\060\021\006\003
\125\035\016\004\012\004\010\114\116\314\045\050\003\051\201\060
\037\006\003\125\035\043\004\030\060\026\200\024\125\344\201\321
\021\200\276\330\211\271\010\243\061\371\241\044\011\026\271\160
\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000\003
\202\001\001\000\227\114\357\112\072\111\254\162\374\060\040\153
\264\051\133\247\305\225\004\220\371\062\325\302\205\152\336\003
\241\067\371\211\000\260\132\254\125\176\333\103\065\377\311\001
\370\121\276\314\046\312\310\152\244\304\124\076\046\036\347\014
\243\315\227\147\224\335\246\102\353\134\315\217\071\171\153\063
\171\041\006\171\372\202\104\025\231\314\301\267\071\323\106\142
\174\262\160\353\157\316\040\252\076\031\267\351\164\202\234\264
\245\113\115\141\000\067\344\207\322\362\024\072\144\174\270\251
\173\141\340\223\042\347\325\237\076\107\346\066\166\240\123\330
\000\003\072\017\265\063\376\226\312\323\322\202\072\056\335\327
\110\341\344\247\151\314\034\351\231\112\347\312\160\105\327\013
\007\016\232\165\033\320\057\222\157\366\244\007\303\275\034\113
\246\204\266\175\250\232\251\322\247\051\361\013\127\151\036\227
\127\046\354\053\103\254\324\105\203\005\000\351\343\360\106\100
\007\372\352\261\121\163\223\034\245\335\123\021\067\310\052\247
\025\047\035\264\252\314\177\252\061\060\374\270\105\237\110\011
\355\020\342\305
END

# Trust for Certificate "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (en)"
CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
CKA_TOKEN CK_BBOOL CK_TRUE
CKA_PRIVATE CK_BBOOL CK_FALSE
CKA_MODIFIABLE CK_BBOOL CK_FALSE
CKA_LABEL UTF8 "Explicitly Distrusted Malaysian Digicert Sdn. Bhd. (en)"
CKA_CERT_SHA1_HASH MULTILINE_OCTAL
\153\074\073\200\255\312\246\272\212\237\124\246\172\355\022\151
\005\155\061\046
END
CKA_CERT_MD5_HASH MULTILINE_OCTAL
\327\151\141\177\065\017\234\106\243\252\353\370\125\374\204\362
END
CKA_ISSUER MULTILINE_OCTAL
\060\201\264\061\024\060\022\006\003\125\004\012\023\013\105\156
\164\162\165\163\164\056\156\145\164\061\100\060\076\006\003\125
\004\013\024\067\167\167\167\056\145\156\164\162\165\163\164\056
\156\145\164\057\103\120\123\137\062\060\064\070\040\151\156\143
\157\162\160\056\040\142\171\040\162\145\146\056\040\050\154\151
\155\151\164\163\040\154\151\141\142\056\051\061\045\060\043\006
\003\125\004\013\023\034\050\143\051\040\061\071\071\071\040\105
\156\164\162\165\163\164\056\156\145\164\040\114\151\155\151\164
\145\144\061\063\060\061\006\003\125\004\003\023\052\105\156\164
\162\165\163\164\056\156\145\164\040\103\145\162\164\151\146\151
\143\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171
\040\050\062\060\064\070\051
END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\006\007\377\377\377\377\377
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_UNTRUSTED
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE

4 changes: 2 additions & 2 deletions security/nss/lib/ckfw/builtins/nssckbi.h
Expand Up @@ -77,8 +77,8 @@
* of the comment in the CK_VERSION type definition.
*/
#define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 1
#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 87
#define NSS_BUILTINS_LIBRARY_VERSION "1.87"
#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 88
#define NSS_BUILTINS_LIBRARY_VERSION "1.88"

/* These version numbers detail the semantic changes to the ckfw engine. */
#define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1
Expand Down
6 changes: 5 additions & 1 deletion toolkit/mozapps/extensions/AddonRepository.jsm
Expand Up @@ -1309,6 +1309,10 @@ var AddonDatabase = {

try {
this.connection = Services.storage.openUnsharedDatabase(dbfile);
if (this.connection.schemaVersion > DB_SCHEMA) {
this.connection.close();
throw "Unknown database schema";
}
} catch (e) {
this.initialized = false;
ERROR("Failed to open database", e);
Expand Down Expand Up @@ -1408,7 +1412,7 @@ var AddonDatabase = {
try {
return this.statementCache[aKey] = this.connection.createStatement(sql);
} catch (e) {
ERROR("Error creating statement " + aKey + " (" + aSql + ")");
ERROR("Error creating statement " + aKey + " (" + sql + ")");
throw e;
}
},
Expand Down
43 changes: 43 additions & 0 deletions toolkit/mozapps/extensions/test/xpcshell/test_bug689375.js
@@ -0,0 +1,43 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/


function run_test() {
do_test_pending();
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");

// Write out a minimal database.
let dbfile = gProfD.clone();
dbfile.append("addons.sqlite");
let db = AM_Cc["@mozilla.org/storage/service;1"].
getService(AM_Ci.mozIStorageService).
openDatabase(dbfile);

db.createTable("futuristicSchema",
"id INTEGER, " +
"sharks TEXT, " +
"lasers TEXT");

db.schemaVersion = 1000;
db.close();

Services.obs.addObserver({
observe: function () {
Services.obs.removeObserver(this, "addon-repository-shutdown");
// Check the DB schema has changed once AddonRepository has freed it.
db = AM_Cc["@mozilla.org/storage/service;1"].
getService(AM_Ci.mozIStorageService).
openDatabase(dbfile);
do_check_eq(db.schemaVersion, 1);
db.close();
do_test_finished();
}
}, "addon-repository-shutdown", null);

// Force a connection to the addon database to be opened.
Services.prefs.setBoolPref("extensions.getAddons.cache.enabled", true);
AddonRepository.getCachedAddonByID("test1@tests.mozilla.org", function (aAddon) {
AddonRepository.shutdown();
});
}
1 change: 1 addition & 0 deletions toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
Expand Up @@ -57,6 +57,7 @@ tail =
[test_bug620837.js]
[test_bug655254.js]
[test_bug659772.js]
[test_bug689375.js]
[test_cacheflush.js]
[test_checkcompatibility.js]
[test_corrupt.js]
Expand Down

0 comments on commit 38e1abc

Please sign in to comment.