diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 19:25:12 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 19:25:12 +0000 |
commit | 1b93c237f36e291242da6b03550f2c4a9f1c6d1c (patch) | |
tree | 91bbdda0b6425fc5a2b191ef0777619f5cce8f19 /mojo/apps | |
parent | 41494f74e8f9dac770129841b73b5251b96b6fe0 (diff) | |
download | chromium_src-1b93c237f36e291242da6b03550f2c4a9f1c6d1c.zip chromium_src-1b93c237f36e291242da6b03550f2c4a9f1c6d1c.tar.gz chromium_src-1b93c237f36e291242da6b03550f2c4a9f1c6d1c.tar.bz2 |
Introduce a Gin class instead of using global functions to control gin
The Gin class holds and controls a v8::Isolate. The isolate is not
entered by default, i.e. before you can use gin for a given Gin
instance, you need to enter the isolate first, e.g. by using a
v8::Isolate::Scope.
This has the advantage that we don't rely on the deprecate default
isolate, and also support having multiple isolates in one process.
BUG=317398
R=abarth@chromium.org
TEST=gin_unittests and mojo_js_bindings_unittests pass
Review URL: https://codereview.chromium.org/76353002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/apps')
-rw-r--r-- | mojo/apps/js/main.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mojo/apps/js/main.cc b/mojo/apps/js/main.cc index 6f8cdb3..1d5e896 100644 --- a/mojo/apps/js/main.cc +++ b/mojo/apps/js/main.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gin/initialize.h" +#include "gin/gin.h" #include "mojo/public/system/core.h" #include "mojo/public/system/macros.h" @@ -18,7 +18,7 @@ extern "C" MOJO_APPS_JS_EXPORT MojoResult CDECL MojoMain( mojo::Handle pipe) { - gin::Initialize(); + gin::Gin instance; // TODO(abarth): Load JS off the network and execute it. return MOJO_RESULT_OK; } |