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

Unified Diff: gin/shell/gin_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: gin/shell/gin_main.cc
diff --git a/gin/shell/gin_main.cc b/gin/shell/gin_main.cc
index ca984f7573846e13b2b8452ff9334ade3ded004d..889cbb18e8eec63eb6f57dabd8fde3aff7c84380 100644
--- a/gin/shell/gin_main.cc
+++ b/gin/shell/gin_main.cc
@@ -6,8 +6,9 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/i18n/icu_util.h"
#include "base/message_loop/message_loop.h"
-#include "gin/initialize.h"
+#include "gin/gin.h"
#include "gin/modules/console.h"
#include "gin/modules/module_runner_delegate.h"
#include "gin/test/file_runner.h"
@@ -58,12 +59,14 @@ class ShellRunnerDelegate : public ModuleRunnerDelegate {
int main(int argc, char** argv) {
base::AtExitManager at_exit;
CommandLine::Init(argc, argv);
- gin::Initialize();
+ base::i18n::InitializeICU();
+
+ scoped_ptr<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.
base::MessageLoop message_loop;
gin::ShellRunnerDelegate delegate;
- gin::Runner runner(&delegate, v8::Isolate::GetCurrent());
+ gin::Runner runner(&delegate, instance->isolate());
CommandLine::StringVector args = CommandLine::ForCurrentProcess()->GetArgs();
for (CommandLine::StringVector::const_iterator it = args.begin();

Powered by Google App Engine
This is Rietveld 408576698