Closed Bug 1134034 Opened 7 years ago Closed 6 years ago

chrome-only parentId and name on AudioParam for devtools


(Core :: Web Audio, defect)

Not set



Tracking Status
firefox40 --- fixed


(Reporter: jsantell, Assigned: padenot)




(1 file, 1 obsolete file)

Similar to the chrome-only IDs added for AudioNodes in bug 1015783 for the devtools, we need a way to identify AudioParam's AudioNode ID (Parent ID) and the param's name.

Previously we got by having set expando properties on XPCNativeWrappers, but after adding more param tools (the automation panel), these properties are no longer reliable after using these tools (and do not persist, more information in bug 1125600#6). We'll have to hold back the automation panel from uplifting because bug 1125600 will actually break content usage of the web audio API.

Is this something that can be implemented? `parentId` and `name` on AudioParams?
This can be accomplished by setting the values on the content nodes, but would rather not expose this information, like the AudioNode's `id`
Assignee: nobody → padenot
This needs tests, that's probably happen on monday.
Depends on: 1116852
OS: Mac OS X → All
Hardware: x86 → All
Any thoughts on `parentId` vs. `parentNodeId` ?
Attachment #8591718 - Flags: review?(ehsan)
Attachment #8590924 - Attachment is obsolete: true
Comment on attachment 8591718 [details] [diff] [review]
Add a chrome-only parentId and name on AudioParam for devtools. r=

Review of attachment 8591718 [details] [diff] [review]:

::: dom/media/webaudio/AudioParam.h
@@ +121,5 @@
>      AudioParamTimeline::CancelScheduledValues(DOMTimeToStreamTime(aStartTime));
>      mCallback(mNode);
>    }
> +  uint32_t ParentNodeId()

Nit: const

@@ +126,5 @@
> +  {
> +    return mNode->Id();
> +  }
> +
> +  void GetName(nsAString& aName)

Nit: const

::: dom/webidl/AudioParam.webidl
@@ +41,5 @@
> +// Mozilla extension
> +partial interface AudioParam {
> +  // The ID of the AudioNode this AudioParam belongs to.
> +  [ChromeOnly]
> +  readonly attribute unsigned long parentNodeId;

I'm ambivalent on the name.
Attachment #8591718 - Flags: review?(ehsan) → review+
:D Thanks Paul and Ehsan!
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
No longer depends on: 1116852
You need to log in before you can comment on or make changes to this bug.