bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Adapt DOM Inspector for mozilla2 xpcom changes

RESOLVED DUPLICATE of bug 576910

Status

Other Applications
DOM Inspector
RESOLVED DUPLICATE of bug 576910
8 years ago
8 years ago

People

(Reporter: Fallen, Assigned: Fallen)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

8 years ago
Created attachment 455888 [details] [diff] [review]
Fix - v1

After bug 568691 landed, dom inspector command line handler registration isn't correct anymore. This patch fixes. Unfortunately, it seems we need a both the manifest file and a jar.mn. I filed bug 576767, lets hope its reopened.

From what I could see, Seamonkey now uses the toolkit commandline handler, so there's no need for specialcasing.

Also, who should I pick for superreview here?
Attachment #455888 - Flags: review?(neil)
(Assignee)

Comment 1

8 years ago
Created attachment 455889 [details] [diff] [review]
Fix - v2

Forgot to bump the install.rdf version
Attachment #455888 - Attachment is obsolete: true
Attachment #455889 - Flags: review?(neil)
Attachment #455888 - Flags: review?(neil)

Comment 2

8 years ago
Comment on attachment 455889 [details] [diff] [review]
Fix - v2

>-EXTRA_COMPONENTS=inspector-cmdline.js
>+EXTRA_COMPONENTS = inspector-cmdline.js inspector-cmdline.manifest
Instead of this, why not set NO_JS_MANIFEST to 1?

>   handle : function handler_handle(cmdLine) {
>-    var args = Components.classes["@mozilla.org/supports-string;1"]
>-                         .createInstance(nsISupportsString);
>+    let args = Components.classes["@mozilla.org/supports-string;1"]
>+                         .createInstance(Components.interfaces.nsISupportsString);
>     try {
>-      var uristr = cmdLine.handleFlagWithParam("inspector", false);
>-      if (uristr == null)
>+      let uristr = cmdLine.handleFlagWithParam("inspector", false);
>+      if (uristr == null) {
>         return;
>+      }
>       try {
>         args.data = cmdLine.resolveURI(uristr).spec;
>-      }
>-      catch (e) {
>+      } catch (e) {
>         return;
>       }
>-    }
>-    catch (e) {
>+    } catch (e) {
The rewriting was unnecessary and detracts from the patch.

>+    Services.ww.openWindow(null, "chrome://inspector/content/", "_blank",
>+                           "chrome,dialog=no,all", args);
You can't do this, DOM Inspector needs to install in Firefox 3.0

>+var NSGetFactory = XPCOMUtils.generateNSGetFactory([InspectorCmdLineHandler]);
And you also need to do something about this. At least XPCOMUtils existed in Firefox 3.0 so you can easily generate the module for older versions.

>diff --git a/base/js/jar.mn b/base/js/jar.mn
Why not add the lines to the existing jar.mn?

>+        <em:maxVersion>4.0b2pre</em:maxVersion>
This is only valid if AMO has already updated (I didn't check though).
Attachment #455889 - Flags: review?(neil) → review-

Comment 3

8 years ago
(In reply to comment #2)
>(From update of attachment 455889 [details] [diff] [review])
>>+var NSGetFactory = XPCOMUtils.generateNSGetFactory([InspectorCmdLineHandler]);
>And you also need to do something about this. At least XPCOMUtils existed in
>Firefox 3.0 so you can easily generate the module for older versions.
Although you'll need to add the 3.0 command line category bits.
(In reply to comment #0)
> Also, who should I pick for superreview here?
you do not need it
(In reply to comment #2)
> You can't do this, DOM Inspector needs to install in Firefox 3.0
I'm OK with dropping support for Firefox 3.0.  It's been end of lifed (but we shouldn't drop support if it also breaks a supported version of Seamonkey).

Updated

8 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 576910
You need to log in before you can comment on or make changes to this bug.