Closed Bug 189950 Opened 22 years ago Closed 20 years ago

Inspector uses @mozilla.org/network/local-file-channel;1

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.7final

People

(Reporter: bzbarsky, Assigned: sgautherie)

References

Details

Attachments

(1 obsolete file)

It looks like the "@mozilla.org/network/local-file-channel;1" contractid is no
more and that we should be using nsIIOService... the code involved lives in
http://lxr.mozilla.org/seamonkey/source/extensions/inspector/resources/content/jsutil/system/file.js
grr.. missed one!  actually, since asyncOpen is not called, it looks like this
code should just create a file input stream directly instead of going through
the file channel code.

here's the contract-id for a component implementing nsIFileInputStream:

  @mozilla.org/network/file-input-stream;1

sorry for missing this one.  i can bang out a patch once i get some free time.
This patch does fix the error.
bz says file.js is unused, and I should instead remove the file from chrome.
No, I said that part of file.js is unused.  The rest of it might be used.  I
don't know.
Even if it's not used now, would this be a good util to beef up and add to our
toolkit?
Possibly.  You may want to talk to the original authors on mozdev; they have
likely improved it since Hewitt dumped a copy into Inspector.  So starting with
the Inspector version is silly, imo.
Yep, it's called jslib.  ;-)

  http://jslib.mozdev.org/

It's a shame there is so much of a disconnect between Mozdev.org and Mozilla.org.


--pete

*** Bug 217210 has been marked as a duplicate of this bug. ***
Mass re-assigning bugs to dom.inspector@extensions.bugs
Assignee: caillon → dom.inspector
This was referenced by Alex Vincent in bug 193486 comment 16.  Bug 193486
currently blocks bug 214269 which is slated for FB 0.8 release.

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031017 Firebird/0.7

Error: uncaught exception: [Exception... "Invalid ClassID or ContractID" 
nsresult: "0x80570017 (NS_ERROR_XPC_BAD_CID)"  location: "JS frame ::
chrome://inspector/content/jsutil/system/file.js :: <TOP_LEVEL> :: line 119" 
data: no]
Blocks: 193486
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7a) Gecko/20040219] (W98SE)

(Confirming on Mozilla Suite)

Updating:
*(S) normal -> major, as "uncaught exception".
Severity: normal → major
Comment on attachment 119378 [details] [diff] [review]
(Av1) patch per darin's suggestion
[Checked in: Comment 23]


Or should (part of) the mozdev.org file.js be landed instead ??

For example it now reads:
{
const JS_FILE_IOSERVICE_CID    = "@mozilla.org/network/io-service;1";
const JS_FILE_I_STREAM_CID     = "@mozilla.org/scriptableinputstream;1";
const JS_FILE_OUTSTREAM_CID    = "@mozilla.org/network/file-output-stream;1";

const JS_FILE_F_TRANSPORT_SERVICE_CID  =
"@mozilla.org/network/file-transport-service;1";
}
Attachment #119378 - Attachment description: patch per darin's suggestion → (Av1) patch per darin's suggestion
Attachment #119378 - Flags: review?(darin)
Comment on attachment 119378 [details] [diff] [review]
(Av1) patch per darin's suggestion
[Checked in: Comment 23]


Should the following change be added to ?
{
-const JSFILE_I_FILE_CHANNEL	       = "nsIFileChannel";
+const JSFILE_I_FILE_CHANNEL	       = "nsIFileInputStream";
}

I don't get the reported exception with/without it...
An uncaught exception which doesn't interfere in DOM Inspector's actual 
operations is major?  I'm sorry, I don't get that.

What's the av1 bit mean?
Attachment #119378 - Flags: review?(darin) → review+
Attachment #119378 - Flags: superreview?(brendan)
(In reply to comment #14)
> An uncaught exception which doesn't interfere in DOM Inspector's actual 
> operations is major?  I'm sorry, I don't get that.

That how I rate the JS.C. outputs: warning=minor; error=normal; exception=major...

> What's the av1 bit mean?

That how I identify patches: A/B/C/... for each issue; vN for a patch version...

*****

Has anyone an answer to my comment 13 question ?
Attachment #119378 - Flags: superreview?(brendan) → superreview+
Comment on attachment 119378 [details] [diff] [review]
(Av1) patch per darin's suggestion
[Checked in: Comment 23]


alex:
Do you agree to land this/your patch ?
I can't land anything, for two reasons.  (1) I don't have CVS access.  (2) My 
primary Internet connection is down.

Would someone else care to do the honors?  caillon, timeless?
(In reply to comment #17)
> I can't land anything, for two reasons.  (1) I don't have CVS access.  (2) My 
> primary Internet connection is down.
> 
> Would someone else care to do the honors?  caillon, timeless?

"Unless otherwise",
neil@p will do it for me/us when v1.8a opens...
*** Bug 239012 has been marked as a duplicate of this bug. ***
*** Bug 239220 has been marked as a duplicate of this bug. ***
Comment on attachment 119378 [details] [diff] [review]
(Av1) patch per darin's suggestion
[Checked in: Comment 23]


'approval1.7=?':
Trivial code fix, no risk;
(Trying v1.7 instead of waiting for v1.8a, as v1.7 will become new
long-lived...)
Attachment #119378 - Flags: approval1.7?
Comment on attachment 119378 [details] [diff] [review]
(Av1) patch per darin's suggestion
[Checked in: Comment 23]

a=asa (on behalf of drivers) for checkin to 1.7
Attachment #119378 - Flags: approval1.7? → approval1.7+
Assignee: dom-inspector → gautheri
Target Milestone: --- → mozilla1.7final
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attachment #119378 - Attachment description: (Av1) patch per darin's suggestion → (Av1) patch per darin's suggestion [Checked in: Comment 23]
Attachment #119378 - Attachment is obsolete: true
verified.

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040412
Firefox/0.8.0+
Status: RESOLVED → VERIFIED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: