As of Bug 792059 landing, If you're adding new WebIDL interfaces to gecko,
we will now generate constant definitions in the binding namespace of the
C++ binding headers.

For example, if you have a WebIDL interface that looks like

---

interface TestExampleInterface {
...
  [NeedsWindowsUndef]
  const unsigned long NO_ERROR = 0xffffffff;
...
}

---

This will now be accessible in C++ as
mozilla::dom::TestExampleInterfaceBinding::NO_ERROR. You will no longer
need to copy constant definitions into your binding implementations.

This addition also creates the new [NeedsWindowsUndef] extended attribute,
as some WebIDL constant names conflict with windows.h macros, and undef'ing
them in the binding generation is easier than tracking down include order
issues.

This information will be in the MDN WebIDL Bindings page soon.

Bug 1407106 has been created to clean up the interface const definitions
already in gecko.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to