> On Jan 15, 2016, at 00:22, Sammy Patenotte <[email protected]> wrote: > > 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}
2147500034 is NS_ERROR_NO_INTERFACE. Maybe you forgot to add the .xpt file for your component to the corresponding package-manifest.in file? https://dxr.mozilla.org/mozilla-central/source/b2g/installer/package-manifest.in -- reuben _______________________________________________ dev-fxos mailing list [email protected] https://lists.mozilla.org/listinfo/dev-fxos

