> Remove 'signaling_unittests' from the list of tests in 
> http://mxr.mozilla.org/mozilla-central/source/media/webrtc/signaling/test/moz.build
>  

Yes, it worked. Now the code compiles. There are, however, several other 
problems, which I am describing below.

> Filing a bug on "Core: WebRTC", pasting your build log, and assigning it 
> to ":jib" should be good enough, I think; I talked to Jan-Ivar about 
> this already yesterday so it's not like it will come as a surprise.  ;)

Perfect. The bug report was filled by me yesterday.

For now, the current code looks as follows:

------------------------------------------------------------------------------
        cgThings = []

        if setter:
            cgThings.append(CGGeneric('printf("setter: ' + nativeMethodName + ' 
[");\n'))
            cgThings.append(CGGeneric('nsPIDOMWindow* cwindow = 
xpc::WindowGlobalOrNull(obj);\n'))
            cgThings.append(CGGeneric('nsIURI* oURI = 0;\n'))
            cgThings.append(CGGeneric('if (cwindow) { oURI = 
cwindow->GetDocumentURI(); }\n'))
            cgThings.append(CGGeneric('nsCString spec;\n'))
            cgThings.append(CGGeneric('if (oURI) { oURI->GetAsciiSpec(spec); 
}\n'))
            cgThings.append(CGGeneric('if (oURI) { printf("%s", spec.get()); 
}\n'))
            cgThings.append(CGGeneric('printf("]\\n");\n'))
        elif getter:
            cgThings.append(CGGeneric('printf("getter: ' + nativeMethodName + ' 
[");\n'))
            cgThings.append(CGGeneric('nsPIDOMWindow* cwindow = 
xpc::WindowGlobalOrNull(obj);\n'))
            cgThings.append(CGGeneric('nsIURI* oURI = 0;\n'))
            cgThings.append(CGGeneric('if (cwindow) { oURI = 
cwindow->GetDocumentURI(); }\n'))
            cgThings.append(CGGeneric('nsCString spec;\n'))
            cgThings.append(CGGeneric('if (oURI) { oURI->GetAsciiSpec(spec); 
}\n'))
            cgThings.append(CGGeneric('if (oURI) { printf("%s", spec.get()); 
}\n'))
            cgThings.append(CGGeneric('printf("]\\n");\n'))
        else:
            cgThings.append(CGGeneric('printf("method: ' + nativeMethodName + ' 
[");\n'))
            cgThings.append(CGGeneric('printf("]\\n");\n'))
------------------------------------------------------------------------------

There are, however, 2 important problems:

1. Using this method, I am obtaining only this URL which is displayed at the 
browser bar (the URL of the currently opened browser tab). This is not what I 
wanted :) I want to have the exact URLs of the particular files in which the 
calls were. So, if a particular method is called from a JavaScript from 
Doubleclick.net, I expect to get a URL of this JavaScript. Any idea how to get 
that?

2. This methodology works only for getters and setters. When I try to do that 
with methods, the code does not compile. The main problem is that there are 
many methods which do not have "obj" as the second parameter. They have 
sometimes "proxy" or something else, but as far as I saw, all these second 
function parameters are of the correct type. The only problem is that I do not 
know how to guess the correct name - or avoid placing my code if the argument 
of the correct type is not present in the invocation of the method at all. But, 
this is a minor problem, which can be solved later.

Best regards,
Tomasz
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to