gecko-dev/js
Kris Maglione 3e8d266e8a Bug 1513366: Part 1 - Add do_ImportModule helper for importing JS modules. r=mccr8
This helper makes it considerably easier for C++ code to import a JS module
and wrap it in an appropriately-defined XPIDL interface for its exports.
Typical usage is something like:

Foo.jsm:

  var EXPORTED_SYMBOLS = ["foo"];

  function foo(bar) {
    return bar.toString();
  }

mozIFoo.idl:

  interface mozIFoo : nsISupports {
    AString foo(double meh);
  }

Thing.cpp:

  nsCOMPtr<mozIFoo> foo = do_ImportModule(
    "resource://meh/Foo.jsm");

  MOZ_TRY(foo->Foo(42));

Differential Revision: https://phabricator.services.mozilla.com/D14209

--HG--
extra : rebase_source : 4d518205b173fc210908235b42ddace590e6b7e5
2018-12-11 13:28:20 -08:00
..
ductwork/debugger Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
examples
ipc Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
public Merge mozilla-central to mozilla-inbound 2018-12-18 07:36:08 +02:00
rust Bug 1513108 - Remove the separate class extension hook for getting a weakmap key delegate, r=jonco 2018-12-07 14:38:01 -08:00
src Merge mozilla-central to mozilla-inbound 2018-12-18 07:36:08 +02:00
xpconnect Bug 1513366: Part 1 - Add do_ImportModule helper for importing JS modules. r=mccr8 2018-12-11 13:28:20 -08:00
app.mozbuild
ffi.configure Bug 1480550 - add ctypes support for aarch64 windows; r=dmajor 2018-10-26 13:00:41 -04:00
moz.build
moz.configure Bug 1513134 - Detect unnecessary --help dependencies. r=firefox-build-system-reviewers,gps 2018-12-11 19:34:28 +00:00