Closed Bug 644943 Opened 14 years ago Closed 14 years ago

When entered URL "net2mobiles" getting exceptions (NS_ERROR_FAILURE in nsHandlerService.js) in Error Console

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: samishk87, Assigned: blassey)

References

()

Details

Attachments

(2 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0 Build Identifier: File version. 2.2.0.4100 When i entered the URL "net2mobiles" in the fennec browser i found ERROR EXCEPTIONS in error console of fennec browser For more information please view attachments Thanks & Regards, Sami Ahmed Shaik. Reproducible: Always Steps to Reproduce: 1. Enter the URL in the fennec browser (net2mobiles) and press [Enter] in the keyboard 2. Go to error console of fennec browser 3. Observe the application Actual Results: I found ERROR EXCEPTIONS [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/Raju/Desktop/Mozilla%20Stuff/fennec/components/nsHandlerService.js :: <TOP_LEVEL> :: line 909" data: no] file:///C:/Documents%20and%20Settings/Raju/Desktop/Mozilla%20Stuff/fennec/components/nsHandlerService.js 909" Expected Results: Page should be open without any exceptions Source: Built from: http://hg.mozilla.org/mozilla-central/rev/868be4c08700 Build Platform: target i686-pc-mingw32
Application Screenshot
Not a security issue - and doesn't need to stay hidden.
Group: core-security
Is it a defect or can't resolved? I need a clear comment please. Thanks, Sami Shaik.
Summary: When entered URL "net2mobiles" getting exceptions in Error Console → When entered URL "net2mobiles" getting exceptions (NS_ERROR_FAILURE in nsHandlerService.js) in Error Console
I'm still seeing this on current trunk Windows build, when loading a local .js or .log file (and probably more). I don't see the error occuring on .htm or .txt files. This is the error message: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Users/mw22/Desktop/moz/fennec_builds/2011/fennec20110413/components/nsHandlerService.js :: <TOP_LEVEL> :: line 909" data: no] file:///C:/Users/mw22/Desktop/moz/fennec_builds/2011/fennec20110413/components/nsHandlerService.js 909
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → blassey.bugs
Attachment #529174 - Flags: review?(benjamin)
Comment on attachment 529174 [details] [diff] [review] patch This doesn't look like the right place for these checks. If we really shouldn't ever be using the handler service in the content process, shouldn't be put the check in the service constructor?
Attachment #529174 - Flags: review?(benjamin) → review?(bzbarsky)
Comment on attachment 529174 [details] [diff] [review] patch Yeah, I think Benjamin is right. In any case, this patch clearly breaks the existing code, so r-.
Attachment #529174 - Flags: review?(bzbarsky) → review-
Attached patch patch (obsolete) — Splinter Review
Attachment #529174 - Attachment is obsolete: true
Attachment #529527 - Flags: review?(bzbarsky)
Comment on attachment 529527 [details] [diff] [review] patch >+const HandlerServiceFactory = { >+ _instance: null, >+ createInstance: function (outer, iid) { >+ if (this._instance) >+ return this._instance; >+ >+ let processType = Components.classes["@mozilla.org/xre/runtime;1"]. >+ getService(Components.interfaces.nsIXULRuntime).processType; >+ if (processType != Components.interfaces.nsIXULRuntime.PROCESS_TYPE_DEFAULT) >+ return Components.results.NS_ERROR_NOT_IMPLEMENTED; >+ >+ return (this._instance = new HandlerService()); >+ } >+}; You have Cc, Ci and Cr available. Please use them.
Attached patch patchSplinter Review
using Cc, Ci and Cr
Attachment #529527 - Attachment is obsolete: true
Attachment #529527 - Flags: review?(bzbarsky)
Attachment #529534 - Flags: review?(bzbarsky)
Attachment #529534 - Flags: review?(bzbarsky) → review+
Comment on attachment 529534 [details] [diff] [review] patch >+ if (processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) >+ return Cr.NS_ERROR_NOT_IMPLEMENTED; throw?
(In reply to comment #12) > Comment on attachment 529534 [details] [diff] [review] [review] > patch > > >+ if (processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) > >+ return Cr.NS_ERROR_NOT_IMPLEMENTED; > > throw? the whole point of this is to prevent throwing. The previous patch (attempted) to prevent us from asking for the service where it's used, but the preference from bz and bsmedberg for doing it in the service constructor.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Verified fixed on build: Mozilla /5.0 (Android;Linux armv7l;rv:6.0a1) Gecko/20110517 Firefox/6.0a1 Fennec/6.0a1 Device: LG Optimus 2X (Android 2.2)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: