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

Side by Side Diff: gin/shell/gin_main.cc

Issue 1161053002: Revert of gin: Use V8 Maybe APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maybe-gin-converter
Patch Set: Created 5 years, 6 months 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 unified diff | Download patch
« no previous file with comments | « gin/object_template_builder.cc ('k') | gin/shell_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 gin::ArrayBufferAllocator::SharedInstance()); 68 gin::ArrayBufferAllocator::SharedInstance());
69 gin::IsolateHolder instance; 69 gin::IsolateHolder instance;
70 70
71 base::MessageLoop message_loop; 71 base::MessageLoop message_loop;
72 72
73 gin::GinShellRunnerDelegate delegate; 73 gin::GinShellRunnerDelegate delegate;
74 gin::ShellRunner runner(&delegate, instance.isolate()); 74 gin::ShellRunner runner(&delegate, instance.isolate());
75 75
76 { 76 {
77 gin::Runner::Scope scope(&runner); 77 gin::Runner::Scope scope(&runner);
78 runner.GetContextHolder() 78 v8::V8::SetCaptureStackTraceForUncaughtExceptions(true);
79 ->isolate()
80 ->SetCaptureStackTraceForUncaughtExceptions(true);
81 } 79 }
82 80
83 base::CommandLine::StringVector args = 81 base::CommandLine::StringVector args =
84 base::CommandLine::ForCurrentProcess()->GetArgs(); 82 base::CommandLine::ForCurrentProcess()->GetArgs();
85 for (base::CommandLine::StringVector::const_iterator it = args.begin(); 83 for (base::CommandLine::StringVector::const_iterator it = args.begin();
86 it != args.end(); ++it) { 84 it != args.end(); ++it) {
87 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind( 85 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
88 gin::Run, runner.GetWeakPtr(), base::FilePath(*it))); 86 gin::Run, runner.GetWeakPtr(), base::FilePath(*it)));
89 } 87 }
90 88
91 message_loop.RunUntilIdle(); 89 message_loop.RunUntilIdle();
92 return 0; 90 return 0;
93 } 91 }
OLDNEW
« no previous file with comments | « gin/object_template_builder.cc ('k') | gin/shell_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698