Closed Bug 458061 Opened 16 years ago Closed 16 years ago

Opening Venkman starts Java

Categories

(Other Applications Graveyard :: Venkman JS Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: Gijs)

Details

Attachments

(1 file)

See bug 435772. Request for keyword: sucky-external-software. Ugh. :-(
Al: can I get r+ for you to apply attachment 323141 [details] [diff] [review] to the utils.js we have in Venkman? :-) Cheers!
+// Netscape/Mozilla security manager, for gaining priviledges with consent. See bug 106386. jsenv.HAS_XPCOM = ((typeof Components == "object") && + (typeof Components.classes == "object") && + (typeof Components.interfaces == "object")); Yeeeuck. Object detection. If you're going to go this way, you should probably add this: Components instanceof Components.interfaces.nsIXPCComponents http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/idl/xpccomponents.idl#226 +var ci = jsenv.HAS_XPCOM ? Components.interfaces : {}; +jsenv.HAS_STREAM_PROVIDER = ("nsIStreamProvider" in ci); +jsenv.HAS_SERVER_SOCKETS = ("nsIServerSocket" in ci); +jsenv.HAS_THREAD_MANAGER = ("nsIThreadManager" in ci); +delete ci; Why this change? I understand if we don't have XPCOM, then Components.interfaces doesn't exist... but the original code for these three lines was a lot clearer. I'd prefer a block like this: if (jsenv.HAS_XPCOM) { jsenv.HAS_STREAM_PROVIDER = ("nsIStreamProvider" in Components.interfaces); // ... } else { jsenv.HAS_STREAM_PROVIDER = false; // ... } Sorry, r-.
(In reply to comment #2) > +// Netscape/Mozilla security manager, for gaining priviledges with consent. > > See bug 106386. > > jsenv.HAS_XPCOM = ((typeof Components == "object") && > + (typeof Components.classes == "object") && > + (typeof Components.interfaces == "object")); > > Yeeeuck. Object detection. If you're going to go this way, you should > probably add this: > > Components instanceof Components.interfaces.nsIXPCComponents > > http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/idl/xpccomponents.idl#226 > > +var ci = jsenv.HAS_XPCOM ? Components.interfaces : {}; > +jsenv.HAS_STREAM_PROVIDER = ("nsIStreamProvider" in ci); > +jsenv.HAS_SERVER_SOCKETS = ("nsIServerSocket" in ci); > +jsenv.HAS_THREAD_MANAGER = ("nsIThreadManager" in ci); > +delete ci; > > Why this change? I understand if we don't have XPCOM, then > Components.interfaces doesn't exist... but the original code for these three > lines was a lot clearer. I'd prefer a block like this: > > if (jsenv.HAS_XPCOM) { > jsenv.HAS_STREAM_PROVIDER = ("nsIStreamProvider" in Components.interfaces); > // ... > } else { > jsenv.HAS_STREAM_PROVIDER = false; > // ... > } > > Sorry, r-. All good points, thanks! However, it turns out that the venkman-utils.js file is anyway very different from the IRC one by now... :-( Sorry. So what I'll do is just remove the Java detection, because the whole of Vnk will be massive fail when we don't have XPCOM anyway... Patch in a sec.
Attached patch PatchSplinter Review
So, removing a bunch of dead code, per: http://mxr.mozilla.org/seamonkey/search?string=jsenv&find=%2Fextensions%2Fvenkman%2F we don't use this anyway.
Attachment #341299 - Flags: review?(ajvincent)
Comment on attachment 341299 [details] [diff] [review] Patch I'll buy that. :) I hope the Chatzilla code can be amended per my suggestions, but that's not something I can review on.
Attachment #341299 - Flags: review?(ajvincent) → review+
Checking in mozilla/extensions/venkman/resources/content/venkman-utils.js; /cvsroot/mozilla/extensions/venkman/resources/content/venkman-utils.js,v <-- venkman-utils.js new revision: 1.38; previous revision: 1.37 done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
(In reply to comment #5) > I hope the Chatzilla code can be amended per my suggestions Did you file a bug on this ?
Serge: no, no one did.
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: