• abarth@chromium.org's avatar
    [Mojo] Improve JavaScript API for MojoReadMessage · ec95fdfd
    abarth@chromium.org authored
    Originally, I tried to make the JavaScript bindings for the core Mojo APIs a
    literal translation of the C APIs, but that makes MojoReadMessage a bit awkward
    because C needs to worry much more about buffer allocation than JavaScript. In
    building towards using the hello_world_service, I found that it was much easier
    to push the MojoReadMessage pattern from connector.cc into C++ and make the
    JavaScript API a bit more idiomatic by just returning an ArrayBuffer for the
    message and an Array of handles.
    
    BUG=317398
    
    Review URL: https://codereview.chromium.org/83143002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236999 0039d316-1c4b-4281-b951-d872f2087c98
    ec95fdfd
module_registry.cc 6.59 KB