From 146b08153cf22a2ddd1e159107cfc0aa098e8130 Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" Date: Thu, 22 Jun 2006 11:18:23 +0000 Subject: [PATCH] =?UTF-8?q?fall=20back=20on=20the=20local=20URI=20if=20a?= =?UTF-8?q?=20generator=20has=20no=20source=20URI;=20a=20convenience=20for?= =?UTF-8?q?=20generator=20developers=20so=20they=20don't=20have=20to=20mak?= =?UTF-8?q?e=20up=20a=20fake=20source=20URI=20while=20developing=20their?= =?UTF-8?q?=20generators;=20patch=20by=20Simon=20B=EF=BF=BD=EF=BF=BDnzli?= =?UTF-8?q?=20bug=3D342226=20r=3Dmyk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../microsummaries/src/nsMicrosummaryService.js.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/browser/components/microsummaries/src/nsMicrosummaryService.js.in b/browser/components/microsummaries/src/nsMicrosummaryService.js.in index bf41079c83e3..5da41aab6c80 100644 --- a/browser/components/microsummaries/src/nsMicrosummaryService.js.in +++ b/browser/components/microsummaries/src/nsMicrosummaryService.js.in @@ -1113,7 +1113,8 @@ MicrosummaryGenerator.prototype = { // Normally this is just the URL from which we download the generator, // but for generators stored in the app or profile generators directory - // it's the value of the generator tag's sourceURI attribute. + // it's the value of the generator tag's sourceURI attribute (or the + // generator's local URI should the sourceURI be missing). _uri: null, get uri() { return this._uri }, set uri(newValue) { this._uri = newValue }, @@ -1216,8 +1217,9 @@ MicrosummaryGenerator.prototype = { // if this is a locally-installed generator, since for remote generators // the source URI of the generator is the URI from which we downloaded it. if (this.localURI) { - //NS_ASSERT(xml.hasAttribute("sourceURI"), "local generator has no source URI"); - this.uri = this._ios.newURI(xml.getAttribute("sourceURI"), null, null); + this.uri = xml.hasAttribute("sourceURI") ? + this._ios.newURI(xml.getAttribute("sourceURI"), null, null) : + this.localURI; // locally created generator without sourceURI } // Slurp the include/exclude rules that determine the pages to which