Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(689)

Unified Diff: mojo/apps/js/main.cc

Issue 76353002: Introduce a Gin class instead of using global functions to control gin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/apps/js/main.cc
diff --git a/mojo/apps/js/main.cc b/mojo/apps/js/main.cc
index 6f8cdb367ada153fd44ba02eb4abb577174ca088..e43909be79efba44d7c7b9c681338fd03d6252a4 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,8 @@
extern "C" MOJO_APPS_JS_EXPORT MojoResult CDECL MojoMain(
mojo::Handle pipe) {
- gin::Initialize();
+ gin::Gin* instance = new gin::Gin;
abarth-chromium 2013/11/19 15:49:21 Why not allocate on the stack?
jochen (gone - plz use gerrit) 2013/11/19 15:57:24 Done.
// TODO(abarth): Load JS off the network and execute it.
+ delete instance;
return MOJO_RESULT_OK;
}

Powered by Google App Engine
This is Rietveld 408576698