On 1/20/15 11:42 AM, Tomasz wrote:
cgThings.append(CGGeneric('nsPIDOMWindow* cwindow =
xpc::WindowGlobalOrNull(obj);\n'))
Yep, that looks good.
error: cannot convert 'nsGlobalWindow*' to 'nsPIDOMWindow*' in initialization
Right, because WindowGlobalOrNull returns nsGlobalWindow*, but the
header it's declared in only forward-declares the nsGlobalWindow class,
so the fact that it inherits from nsPIDOMWindow* is not known in
translation units that don't also include nsGlobalWindow.h.
error: invalid use of incomplete type 'class nsGlobalWindow' nsIURI* oURI =
cwindow->GetDocumentURI();
Yes, this is the same issue.
What you need to do is to make sure that nsGlobalWindow.h is included in
each generated binding file. The simplest way to do that is to add the line
bindingHeaders["nsGlobalWindow.h"] = True
where all the other such lines are (e.g. right after the line that sets
bindingHeaders["xpcpublic.h"]).
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform