Closed Bug 1317606 Opened 3 years ago Closed 3 years ago

Get rid of LegacyIsCallerChromeOrNativeCode in barprop code

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Can use NeedsCallerType instead.
Comment on attachment 8810735 [details] [diff] [review]
Get rid of LegacyIsCallerChromeOrNativeCode in barprop code

Review of attachment 8810735 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/BarProps.cpp
@@ +115,5 @@
>  {
>  }
>  
>  bool
> +MenubarProp::GetVisible(CallerType aCallerType, ErrorResult& aRv)

Why are we adding aCallerType to all these methods but not using it or passing it anywhere?
> Why are we adding aCallerType to all these methods but not using it or passing it anywhere?

We have 5 implementations of BarProp.  Only one of them actually cares about the argument, but they're all implementing the same virtual function, so we need to add it to all 5 implementations.

The one that cares about the argument cares about it in the setter, not the getter.  But NeedsCallerType doesn't have a way to specify that it's for a setter only or a getter only when used on an attribute.  I could add that to codegen, but it hasn't seemed worth the complexity...
Attachment #8810735 - Flags: review?(bkelly) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/55ceefe2f5aa
Get rid of LegacyIsCallerChromeOrNativeCode in barprop code.  r=bkelly
https://hg.mozilla.org/mozilla-central/rev/55ceefe2f5aa
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.