summaryrefslogtreecommitdiffstats
path: root/gin/arguments.cc
Commit message (Collapse)AuthorAgeFilesLines
* Beginning of JS Mojo API to GL.aa@chromium.org2013-12-131-3/+3
| | | | | | | | R=abarth@chromium.org Review URL: https://codereview.chromium.org/111083005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240807 0039d316-1c4b-4281-b951-d872f2087c98
* Gin: Add support for binding JS methods to C++ instance methods.aa@chromium.org2013-12-061-6/+0
| | | | | | | | | | | | | Also: - Added support for computed properties to ObjectTemplateBuilder - Realized it was possible for CreateFunctionTemplate to be just one template BUG= R=abarth@chromium.org, jyasskin@chromium.org Review URL: https://codereview.chromium.org/103703002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239126 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the rest of the functions in core.cc to use CreateFunctionTemplate.aa@chromium.org2013-11-271-3/+16
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/89723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237492 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce gin_shellabarth@chromium.org2013-11-181-4/+3
| | | | | | | | | | | | | | | | | | | | This CL adds a simple shell program for Gin to make edit/test/debug cycle faster. The shell excutes a list of scripts from the command line and loads any requested AMD modules relative to the current working directory. This CL will also let us remove the ugly code in https://codereview.chromium.org/69843003/diff/240001/mojo/public/bindings/js/test/run_js_tests.cc because we now know how to file modules via the file system. Eventually for Mojo, we'll want to use a net_module_provider (instead of the file_module_provider included in this CL) to load additional AMD modules off the network. BUG=317398 R=jochen@chromium.org Review URL: https://codereview.chromium.org/74753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235750 0039d316-1c4b-4281-b951-d872f2087c98
* This CL implements the Asynchronous Module Definition (AMD)abarth@chromium.org2013-11-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API, which we plan to use for JavaScript in Mojo. We don't yet implement every feature in the AMD spec <https://github.com/amdjs/amdjs-api/wiki/AMD>, but we implement the basic framework, which will let us get started writing and testing JavaScript modules in Mojo. The two other leading choices for a modules system are CommonJS and ES6 modules. We decided not to use CommonJS, despite its popularity, because it implies the ability to load modules synchronously. That works well in server environments like node.js, but it won't work well for Mojo where modules might be loaded across a network. I would really like to have used ES6 modules, but the spec isn't finalized yet and V8 doesn't yet implement them. It's likely that we'll replace this AMD module system with ES6 modules once ES6 modules are ready. Structurally, I've implemented AMD in the ModuleRegistry class in a new "modules" directory in Gin. Nothing else in Gin (except the tests) depends on ModuleRegistry, which means folks are free to use Gin without AMD. At the Mojo layer, I've added a dependency on AMD. BUG=317398 Review URL: https://codereview.chromium.org/62333018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235543 0039d316-1c4b-4281-b951-d872f2087c98
* Begin implementing V8 bindings for Mojoabarth@chromium.org2013-11-121-0/+36
This CL contains the beginnings of JavaScript bindings for the core Mojo system. The approach in this CL is to bind as close to the "metal" as possible so as to self-host as much as possiblem in the VM. I've tried to avoid retaining any state on the C++ side of the bindings, but I didn't quite succeed because V8 requires embedders to retain state in order to access the memory that backs ArrayBuffers. In this CL, I've added some basic bindings for the symbols exported by core.h. Specifically, I've created bindings for CreateMessagePipe, Close, Wait, WaitMany, WriteMessage, and ReadMessage. R=aa@chromium.org, darin@chromium.org BUG=317398 Review URL: https://codereview.chromium.org/59153005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234347 0039d316-1c4b-4281-b951-d872f2087c98