Closed
Bug 1368170
Opened 7 years ago
Closed 7 years ago
Remove unused Function.prototype.inherits methods
Categories
(Toolkit :: Safe Browsing, enhancement)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file)
content/moz/lang.js and nsUrlClassifierListManager.js both define a method named "inherits" on Function.prototype, which I guess is supposed to be some kind of class-based inheritance. However, as far as I can tell, these methods are never called. There are a few places that explicitly call a .inherits methods, but they define them right before their use, so hopefully this is okay. I want to make this change because with JSM global sharing (bug 1186409) changing Function.prototype in this way affects all JSMs, including Services.jsm. Marionette code tries to serialize Services.appInfo, which has a field QueryInterface, which is a function. Because of the inherits field on Function.prototype, this serialization seems to result in infinite recursion. (Presumably because the inherits method is itself a function.)
Comment 1•7 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #0) > Marionette code tries to serialize Services.appInfo, which has > a field QueryInterface, which is a function. Because of the inherits field > on Function.prototype, this serialization seems to result in infinite > recursion. (Presumably because the inherits method is itself a function.) This seems like a bug. Do you have a link to the exact location where we try to serialise Services.appInfo directly? I Know we extract values from it, but we should not be trying to serialise Services.appInfo.
Assignee | ||
Comment 2•7 years ago
|
||
(In reply to Andreas Tolfsen ‹:ato› from comment #1) > This seems like a bug. Do you have a link to the exact location where we > try to serialise Services.appInfo directly? I Know we extract values from > it, but we should not be trying to serialise Services.appInfo. I don't exactly know where it was happening, but the script it was running was the same as the one here, which is returning Services.appinfo: http://searchfox.org/mozilla-central/source/testing/marionette/harness/marionette_harness/runner/base.py#669
Assignee | ||
Comment 3•7 years ago
|
||
It looks like this test also returns it: http://searchfox.org/mozilla-central/source/testing/marionette/harness/marionette_harness/tests/unit/test_capabilities.py#17
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
try is green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b75560596a7f2af0dfb6550a369d6acade8f390d
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8871978 [details] Bug 1368170 - Remove unused Function.prototype.inherits methods. https://reviewboard.mozilla.org/r/143514/#review147912
Attachment #8871978 -
Flags: review?(francois) → review+
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0a56ccf2f145 Remove unused Function.prototype.inherits methods. r=francois
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0a56ccf2f145
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•