Closed Bug 795969 Opened 13 years ago Closed 13 years ago

Promote list of pause actors at once

Categories

(DevTools :: Debugger, defect, P2)

x86
Windows Vista
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 19

People

(Reporter: Honza, Assigned: past)

References

Details

Attachments

(1 file, 1 obsolete file)

Upgrading actors will be often done for several actors. For example, expanding an actor in the DOM panel should show list of children (objects) actors that should all be promoted to thread actors (since the DOM panel deals with thread scoped actors). So, it would be useful to have a new packet type that allows to promote list of given actors. Honza
Summary: Upgrade list of pause actors at once → Promote list of pause actors at once
Assignee: nobody → past
Status: NEW → ASSIGNED
Depends on: 795263
Attached patch Patch v1 (obsolete) — Splinter Review
This should do it. I also made protocol logging in the local transport case pretty again per Dave's suggestion in London. The packet format mirrors the releaseMany packet: { "to": "conn0.context2", "type": "threadGrips", "actors": [ "conn0.obj14", "conn0.obj15", "conn0.obj16" ] } { "from": "conn0.context2" }
Attachment #670322 - Flags: review?(rcampbell)
Attachment #670322 - Flags: feedback?(jimb)
Priority: -- → P2
Attached patch Patch v2Splinter Review
I made another bug fix or optimization, depending on how you look at it: when creating object actors in a pause, the thread-lifetime pool is now consulted first, instead of just creating duplicates in the pause-lifetime pool. Moar tests.
Attachment #670322 - Attachment is obsolete: true
Attachment #670322 - Flags: review?(rcampbell)
Attachment #670322 - Flags: feedback?(jimb)
Attachment #670336 - Flags: review?(rcampbell)
Attachment #670336 - Flags: feedback?(jimb)
Comment on attachment 670336 [details] [diff] [review] Patch v2 missed this earlier. objectGrip: function TA_objectGrip(aValue, aPool) { if (!aPool.objectActors) { aPool.objectActors = new WeakMap(); } lazy initializing aPool's objectActors property. Wonder if we can reorder this method to shortcut the check for aPool.objectActors.has(aValue) in the case when we do this? Not critical, just seems like a tiny optimization. if (aPool.objectActors.has(aValue)) { return aPool.objectActors.get(aValue).grip(); + } else if (this.threadLifetimePool.objectActors.has(aValue)) { + return this.threadLifetimePool.objectActors.get(aValue).grip(); } are threadLifetimePool's objectActor's a lower priority than aPool's? Do these need to be coalesced somehow or are they suitably separate? looks fine.
Attachment #670336 - Flags: review?(rcampbell) → review+
(In reply to Rob Campbell [:rc] (:robcee) from comment #3) > Comment on attachment 670336 [details] [diff] [review] > Patch v2 > > missed this earlier. > > objectGrip: function TA_objectGrip(aValue, aPool) { > if (!aPool.objectActors) { > aPool.objectActors = new WeakMap(); > } > > lazy initializing aPool's objectActors property. > > Wonder if we can reorder this method to shortcut the check for > aPool.objectActors.has(aValue) in the case when we do this? Not critical, > just seems like a tiny optimization. I'm going to remove both of these checks in bug 805769. > if (aPool.objectActors.has(aValue)) { > return aPool.objectActors.get(aValue).grip(); > + } else if (this.threadLifetimePool.objectActors.has(aValue)) { > + return this.threadLifetimePool.objectActors.get(aValue).grip(); > } > > are threadLifetimePool's objectActor's a lower priority than aPool's? Do > these need to be coalesced somehow or are they suitably separate? > > looks fine. Currently an object can be in either a thread- or a pause-lifetime pool and its assorted weakmap, so order doesn't really matter. I'm working on unifying the weakmaps in bug 805769.
Comment on attachment 670336 [details] [diff] [review] Patch v2 Review of attachment 670336 [details] [diff] [review]: ----------------------------------------------------------------- Looks great!
Attachment #670336 - Flags: feedback?(jimb) → feedback+
Fixed the harmless but confusing recursion in the threadLifetimePool getter and landed: https://hg.mozilla.org/integration/fx-team/rev/e902df61b34e
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 19
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: