Bug 1098666 - Don't crash when getting this through CPOWs. r=billm

This commit is contained in:
Blake Kaplan 2014-11-14 14:41:59 -08:00
parent 1c25371123
commit a9b4a9b9fe
2 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,7 @@ SiteSpecificUserAgent.prototype = {
}
let data = { uri: aURI };
let result = cpmm.sendSyncMessage("Useragent:GetOverride", data)[0] || HTTP_PROTO_HANDLER.userAgent;
let result = cpmm.sendRpcMessage("Useragent:GetOverride", data)[0] || HTTP_PROTO_HANDLER.userAgent;
if (this.userAgentCache.size >= MAX_CACHE_SIZE) {
this.userAgentCache.clear();

View File

@ -66,6 +66,7 @@
ok(obj.a === 3, "constructor call");
ok(document.title === "Hello, Kitty", "document node");
is(typeof document.cookie, "string", "can get document.cookie");
is(typeof document.defaultView.navigator.userAgent, "string", "can get navigator.userAgent");
data.i = 6;
data.b = false;