Closed Bug 1129093 Opened 11 years ago Closed 4 years ago

HistoryMenu __proto__ assignment triggers: "chrome://...browser.js, line 4763: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create"

Categories

(Firefox :: Bookmarks & History, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dholbert, Unassigned)

References

Details

Noticed this go by in my debug build's terminalspew: { JavaScript warning: chrome://browser/content/browser.js, line 4763: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create } This points to the __proto__ assignment here: > 496 // View for the history menu. > 497 function HistoryMenu(aPopupShowingEvent) { > 498 // Workaround for Bug 610187. The sidebar does not include all the Places > 499 // views definitions, and we don't need them there. > 500 // Defining the prototype inheritance in the prototype itself would cause > 501 // browser.js to halt on "PlacesMenu is not defined" error. > 502 this.__proto__.__proto__ = PlacesMenu.prototype; http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-places.js?rev=a3d02e44a476#502 Setting dependency on bug 632411, which added this chunk, and bug 610187, which is mentioned in the code-comment.

This warning was removed in bug 1049041 so I guess we should close this wontfix? I doubt that for places interactions, these proto rearrangements are going to be the bottleneck at this point. Either way, moving to the correct component...

Component: Menus → Bookmarks & History
Flags: needinfo?(mak)

Yeah, this is not critical, these views should be rewritten anyway, and in a new world they'd be classes in their own modules, not this proto mess.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(mak)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.