Closed Bug 986108 Opened 10 years ago Closed 10 years ago

Make all restartless add-ons debuggable

Categories

(Toolkit :: Add-ons Manager, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: mossop, Assigned: mossop)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

We should make any restartless add-on debuggable by tagging their main bootstrap script with the right metadata.
Depends on: 986587
Depends on: 986639
Depends on: 986757
No longer depends on: 986757
Attached patch patch rev 1 (obsolete) — Splinter Review
This makes the add-ons manager set the same metadata for the bootstrap script that the SDK uses to tag its modules so the add-on debugger will use them. With bug 986107 this makes all sandboxes created by restartless add-ons debuggable.

The side effect of showing bootstrap.js for SDK add-ons might be unwanted but if we switch to native SDK support that will go away. We also have to force hide XPIProvider.jsm since the blob that it evals into the bootstrap scope from bug 618101 makes the whole add-ons manager show up and we don't want that.

Unfocused for the add-ons manager bits, fitzgen for the devtools changes.
Attachment #8396030 - Flags: review?(nfitzgerald)
Attachment #8396030 - Flags: review?(bmcbride)
Comment on attachment 8396030 [details] [diff] [review]
patch rev 1

Review of attachment 8396030 [details] [diff] [review]:
-----------------------------------------------------------------

For the debugger changes.

::: toolkit/devtools/server/actors/script.js
@@ +4654,5 @@
> +    // Hide eval scripts
> +    if (!aSourceURL)
> +      return false;
> +
> +    // XPIProvider.jsm evals some code in every add-on's bootstrap.js. Hide it

Nit: missing period.
Attachment #8396030 - Flags: review?(nfitzgerald) → review+
Er, so, this depends on the patch in bug 911098, but essentially undoes all the relevant changes that patch does? Feels like bug 911098 should just be rebased ontop of this patch, no?
Flags: needinfo?(dtownsend+bugmail)
(In reply to Blair McBride [:Unfocused] from comment #3)
> Er, so, this depends on the patch in bug 911098, but essentially undoes all
> the relevant changes that patch does? Feels like bug 911098 should just be
> rebased ontop of this patch, no?

Bug 911098 has been sort of a mess with multiple patch authors and reviewers. I didn't really want to start weighing in as well while it was still under development and just get the initial parts of the feature that the intern developed landed. I was hoping that would have already happened but we've hit test failures, the fixes for which apply here too.

The tests from this patch won't work without the test parts from bug 911098 so it's sort of a pain to try to re-order. What I can do if you're concerned with messy history/blame is just merge the two patches and land in one changeset.
Flags: needinfo?(dtownsend+bugmail)
Attached patch patch rev 2Splinter Review
Updated patch without the bits that undoes them things what the other bug did do
Attachment #8396030 - Attachment is obsolete: true
Attachment #8396030 - Flags: review?(bmcbride)
Attachment #8396808 - Flags: review?(bmcbride)
Attachment #8396808 - Attachment is patch: true
Attachment #8396808 - Attachment mime type: text/x-patch → text/plain
Comment on attachment 8396808 [details] [diff] [review]
patch rev 2

Review of attachment 8396808 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ +4038,5 @@
>      }
>  
>      let uri = getURIForResourceInFile(aFile, "bootstrap.js").spec;
> +    if (aType == "dictionary")
> +      uri = "resource://gre/modules/addons/SpellCheckDictionaryBootstrap.js"

Nit: Can avoid the getURIForResourceInFile call entirely if this is a dictionary.
Attachment #8396808 - Flags: review?(bmcbride) → review+
https://hg.mozilla.org/mozilla-central/rev/5e08c2640229
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: