Closed Bug 1523755 Opened 7 years ago Closed 2 years ago

Ensure replay.js module is in its own compartment

Categories

(Core Graveyard :: Web Replay, task, P5)

Tracking

(firefox67 affected)

RESOLVED INCOMPLETE
mozilla67
Tracking Status
firefox67 --- affected

People

(Reporter: bhackett1024, Assigned: bhackett1024)

Details

Attachments

(1 file)

The replay.js module is loaded in the same compartment as other system code, which prevents it from being able to debug that code. While this isn't a problem with how things are currently used, it prints out a scary error message:

JavaScript error: resource://devtools/server/actors/replay/replay.js, line 45: TypeError: debugger and debuggee must be in different compartments

For now it would be good to avoid printing this error, but this will need to get fixed properly in order to be able to debug system code.

Attached patch ignore errorSplinter Review

Catch and ignore errors related to adding same-compartment debuggees.

Attachment #9039909 - Flags: review?(lsmyth)
Comment on attachment 9039909 [details] [diff] [review] ignore error Review of attachment 9039909 [details] [diff] [review]: ----------------------------------------------------------------- ::: devtools/server/actors/replay/replay.js @@ +45,5 @@ > + dbg.addDebuggee(global); > + } catch (e) { > + // Ignore errors related to adding a same-compartment debuggee. > + // See bug 1523755. > + if (!/debugger and debuggee must be in different compartments/.test("" + e)) { Are these messages localized at all? Do we have to worry about different error strings in that context?
Attachment #9039909 - Flags: review?(lsmyth) → review+

(In reply to Logan Smyth [:loganfsmyth] from comment #2)

Comment on attachment 9039909 [details] [diff] [review]
ignore error

Review of attachment 9039909 [details] [diff] [review]:

::: devtools/server/actors/replay/replay.js
@@ +45,5 @@

  • dbg.addDebuggee(global);
  • } catch (e) {
  • // Ignore errors related to adding a same-compartment debuggee.
  • // See bug 1523755.
  • if (!/debugger and debuggee must be in different compartments/.test("" + e)) {

Are these messages localized at all? Do we have to worry about different
error strings in that context?

This is a spidermonkey error (JSMSG_DEBUG_SAME_COMPARTMENT) which I don't think is localized anywhere.

Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/548e9d90a38f Ignore same-compartment debuggee errors in replay.js, r=lsmyth.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Type: defect → task
Priority: -- → P5
Product: Core → Core Graveyard
Status: REOPENED → RESOLVED
Closed: 7 years ago2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: