Closed Bug 1021744 Opened 11 years ago Closed 10 years ago

Don't modify globals in QR decoder

Categories

(DevTools Graveyard :: WebIDE, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: jryans, Assigned: jryans)

References

Details

Attachments

(1 file, 1 obsolete file)

In bug 1013997, Alex is working on loading the DevTools modules in one compartment to save memory. This means they will share globals, and so need to play nicely together. The QR decoder extends Array prototype[1], but there's only one use of this, so it could just be inlined. [1]: http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/qrcode/decoder/index.js#2568
Once such a cleanup is made, it can be removed from the loader blacklist added in bug 1013997.
The decoder now leaves Array alone and doesn't add any methods to it, so it's safe to share globals with other loader modules. Also, I've changed the window access method back to getMostRecentWindow, since as discussed elsewhere, hiddenDOMWindow does not work on b2g. Try: https://tbpl.mozilla.org/?tree=Try&rev=5eb6c89e8079
Attachment #8461293 - Flags: review?(paul)
Attachment #8461293 - Flags: review?(paul) → review+
Test failures revealed one more source of evil to fix. Try: https://tbpl.mozilla.org/?tree=Try&rev=cb8ee36e2fcb
Attachment #8461293 - Attachment is obsolete: true
Attachment #8461752 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: