Hi everyone,

I'm having a problem in Gecko, I have created a WebIDL implemented in 
Javascript and need to access it from C++ code.
(the code is at https://gist.github.com/spatenotte/049178616d6808858656)
For that, I created a new .idl interface and the corresponding moz.build.
After that, to call my implementation from C++ code, I do the following:

#include "nsIPrivacyMonitor.h"

nsresult result;
nsCOMPtr<nsIPrivacyMonitor> privacyMonitor = 
do_CreateInstance("@mozilla.org/privacy-monitor;1", &result);
privacyMonitor->NotifyListener("Geoloc", "test-app");

When I test that in my Flame device I get the following errors:

E/TestApp ( 1400): [JavaScript Error: "uncaught exception: 2147500034" {file: 
"app://test-app.gaiamobile.org/app.js" line: 49}]
I/Gecko   (  207): 
I/Gecko   (  207): ###!!! [Parent][MessageChannel] Error: 
(msgtype=0x2A0081,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
I/Gecko   (  207): 
I/Gecko   (  207): [Parent 207] WARNING: pipe error (202): Connection reset by 
peer: file 
/home/sammy/ffos/B2G/gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, 
line 459

I've tried to Google it, and the only thing I found is that the error code for 
exception 2147500034 is NS_NOINTERFACE, so I'm guessing for some reason the 
interface is not found?

If anyone of you has an idea of what I should do, it would be much appreciated.

Best,
Sammy.
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to