Closed Bug 1015665 Opened 11 years ago Closed 11 years ago

Add recording options to CallWatcherActor

Categories

(DevTools Graveyard :: Web Audio Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 33

People

(Reporter: jsantell, Assigned: jsantell)

References

Details

Attachments

(1 file)

When exposing ChromeOnly properties on objects obtained by call-watcher actor, I'm unable to get these ChromeOnly properties, as by the time they get to the webaudio actor, they've already been wrapped. I think call-watcher should work with XPCWrapper objects and expose those to the consuming actors (webgl, webaudio, canvas(?)), where they can be unwrapped if they need to be. I think this is necessary, and should be a relatively easy patch to add this and change the consuming actors to handle it, but wanted to run it by you Victor, and see if there are any downsides you can see.
Flags: needinfo?(vporof)
Assignee: nobody → jsantell
Blocks: 1008497
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #0) Why not wrap the referenced objects again? You'll get the same object. let unwrapped = XPCNativeWrapper.unwrap(content); let wrapped = new XPCNativeWrapper(unwrapped); wrapped == content // true
Flags: needinfo?(vporof)
Thought of doing that, but thought that it may be better to just expose the wrappers from call-watcher itself, rather than doing extra work to ensure that we're securely accessing the correct properties. Either way, you're right, I can just rewrap the object, but maybe this is something we can do in the future to lean up our code.
I honestly don't mind either way. Let's fix this bug if you think it's more elegant or efficient!
This may be more work than what I want to do right now, but ultimately probably the best solution. Running into situations where objects, depending on how they're obtained (return value, property of an object, shallow vs deep) it can differ, so there's a lot of flipping of wrap/unwrap in the webaudio actor that doesn't really make sense (maybe if one is intimately familiar with all the XPCNativeWrapper rules, but have read over that several times and it leaves me with ugly code). Gonna leave this open as a nice refactoring for the future, but won't hold up on the GC work for audio nodes.
No longer blocks: 1008497
Summary: Expose XPCNativeWrappers from call-watcher actor → Add recording options to CallWatcherActor
Add options to CWA specifying whether or not the FunctionCalls should be saved in an array, as well as if it's dealing with wrapped, or unwrapped, objects.
Adding this to bug 1022248, since I think it'll help with some perf issues the web audio editor's seeing
Blocks: 1022248
What're your thoughts on something like this? Only store all function calls in the appropriate tools
Attachment #8448981 - Flags: review?(vporof)
Attachment #8448981 - Flags: review?(vporof) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
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: