Closed
Bug 1016132
Opened 11 years ago
Closed 10 years ago
Port |Bug 985742 - fuelApplication.js:1512 - 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| to SeaMonkey
Categories
(SeaMonkey :: General, defect)
SeaMonkey
General
Tracking
(seamonkey2.26 unaffected, seamonkey2.27 affected, seamonkey2.28 fixed, seamonkey2.29 fixed, seamonkey2.30 fixed)
RESOLVED
FIXED
seamonkey2.30
Tracking | Status | |
---|---|---|
seamonkey2.26 | --- | unaffected |
seamonkey2.27 | --- | affected |
seamonkey2.28 | --- | fixed |
seamonkey2.29 | --- | fixed |
seamonkey2.30 | --- | fixed |
People
(Reporter: iannbugzilla, Assigned: neil)
Details
Attachments
(1 file, 4 obsolete files)
1.43 KB,
patch
|
iannbugzilla
:
review+
iannbugzilla
:
approval-comm-aurora+
iannbugzilla
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
STR
1/ Start recent SeaMonkey trunk build
2/ Instantiate somehow the Application Object
3/ Check console output
Actual result
System JS : WARNING file:///home/gizmo/central/sm-opt/mozilla/dist/bin/components/smileApplication.js:1519 - 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
Expected result
No error about smileApplication.js
Simple port of patch from bug 985742
Fixed typo in function app_observe getPrototypeof vs getPrototypeOf
Attachment #8428933 -
Attachment is obsolete: true
Attachment #8428933 -
Flags: review?(neil)
Attachment #8428943 -
Flags: review?(neil)
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
This works by creating an object whose prototype is extApplication.prototype but has the properties copied from the ApplicationPrototype object. Unfortunately there's no Object.getOwnPropertyDescriptors function so I have to reduce the own property names manually.
Attachment #8431161 -
Flags: review?(iann_bugzilla)
Assignee | ||
Comment 5•11 years ago
|
||
Actually, there's another way: { (__proto__: {} }) doesn't warn, because it's the equivalent of creating an object with a given prototype (bug 948583).
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8434927 -
Flags: review?(iann_bugzilla)
Assignee | ||
Comment 7•11 years ago
|
||
Note that bug 992958 regressed bug 948227 on trunk, so you'll need an older build in order to see the warning.
And I wondered why I no longer see the warning for the steelApplication in TB, right when I wanted to fix it with some of your methods here...
Attachment #8428943 -
Flags: review?(neil)
Comment on attachment 8434927 [details] [diff] [review]
Proposed patch
This looks cleaner than the other option and presumably stops code running slowly.
Attachment #8434927 -
Flags: review?(iann_bugzilla) → review+
Reporter | ||
Comment 10•10 years ago
|
||
Comment on attachment 8431161 [details] [diff] [review]
Another approach
I prefer the other option.
Attachment #8431161 -
Flags: review?(iann_bugzilla) → review-
Comment 11•10 years ago
|
||
Checkin-needed?
Attachment #8428943 -
Attachment is obsolete: true
Attachment #8431142 -
Attachment is obsolete: true
Attachment #8431161 -
Attachment is obsolete: true
Assignee | ||
Comment 12•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-seamonkey2.26:
--- → unaffected
status-seamonkey2.27:
--- → affected
status-seamonkey2.28:
--- → affected
status-seamonkey2.29:
--- → affected
status-seamonkey2.30:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.30
Assignee | ||
Comment 13•10 years ago
|
||
Comment on attachment 8434927 [details] [diff] [review]
Proposed patch
[Approval Request Comment]
Regression caused by (bug #): 948227
User impact if declined: None (cosmetic warning in Error Console only)
Testing completed (on m-c, etc.): Landed on c-c
Risk to taking this patch (and alternatives if risky): Low (Application isn't used by SeaMonkey itself)
String changes made by this patch: None
Attachment #8434927 -
Flags: approval-comm-beta?
Attachment #8434927 -
Flags: approval-comm-aurora?
Reporter | ||
Comment 14•10 years ago
|
||
Comment on attachment 8434927 [details] [diff] [review]
Proposed patch
a=me
Attachment #8434927 -
Flags: approval-comm-beta?
Attachment #8434927 -
Flags: approval-comm-beta+
Attachment #8434927 -
Flags: approval-comm-aurora?
Attachment #8434927 -
Flags: approval-comm-aurora+
Assignee | ||
Comment 15•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•