Closed Bug 1117131 Opened 10 years ago Closed 10 years ago

_ClearCachedIccInfoValue (JSContext*, unsigned int, JS::Value*)' defined but not used [-Werror=unused-function]

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: ferjm, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

I have the following WebIDL: [...] [NavigatorProperty="mozPaymentProvider", NoInterfaceObject, HeaderFile="mozilla/dom/PaymentProviderUtils.h", Func="mozilla::dom::PaymentProviderUtils::EnabledForScope", JSImplementation="@mozilla.org/payment/provider;1"] interface PaymentProvider { [...] [Cached, Pure, Frozen] readonly attribute sequence<PaymentIccInfo> iccInfo; and I am getting this build error: /builds/slave/try-l64-0000000000000000000000/build/src/obj-firefox/dom/bindings/MozPaymentProviderBinding.cpp:773:1: error: 'bool mozilla::dom::PaymentProviderBinding::_ClearCachedIccInfoValue(JSContext*, unsigned int, JS::Value*)' defined but not used [-Werror=unused-function] I couldn't find these combination of attributes in any WebIDL JS implemented, so I was wondering if this is a DOM bindings issue.
Component: Payments/Refunds → DOM
Flags: needinfo?(bzbarsky)
Product: Marketplace → Core
Target Milestone: --- → mozilla36
Version: Avenir → Trunk
Attached file Generated cpp (deleted) —
This is the generated dom/bindings/MozPaymentProviderBinding.cpp
Target Milestone: mozilla36 → ---
Attachment #8543300 - Attachment mime type: text/x-c++src → text/plain
Flags: needinfo?(bzbarsky)
Yep. The method is output based on this condition: if descriptor.interface.isJSImplemented(): but used based on this condition: if (descriptor.interface.isJSImplemented() and descriptor.interface.hasInterfaceObject()):
Blocks: 963382
Seems to me like the latter is actually wrong.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8543379 [details] [diff] [review] Output the JS hooks for our cache-clearing stuff for [Pure] properties on JS-implemented objects even if we have no interface object, since these live on instances Review of attachment 8543379 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense. Thanks for fixing this!
Attachment #8543379 - Flags: review?(continuation) → review+
Oh, and it might be a good idea to add a case to the test WebIDL file for this. Though soon enough I guess we'll have something in the tree that triggers it.
Yeah, we'd have to add a whole new interface to the test IDL to test this... I guess I could do that.
Target Milestone: --- → mozilla37
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: