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

Unified Diff: tools/lexer-shell.cc

Issue 275463002: Unbreak samples and tools. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.cc ('k') | tools/parser-shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer-shell.cc
diff --git a/tools/lexer-shell.cc b/tools/lexer-shell.cc
index 273cdd9f4d7a49d6cffa9b5b7788ddad4f4ccd77..a85dc7dbee7f37b6c8a424b7f0af55bc4df64ecc 100644
--- a/tools/lexer-shell.cc
+++ b/tools/lexer-shell.cc
@@ -206,19 +206,20 @@ int main(int argc, char* argv[]) {
fnames.push_back(std::string(argv[i]));
}
}
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::Isolate* isolate = v8::Isolate::New();
{
+ v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate);
v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
ASSERT(!context.IsEmpty());
{
v8::Context::Scope scope(context);
- Isolate* isolate = Isolate::Current();
double baseline_total = 0;
for (size_t i = 0; i < fnames.size(); i++) {
TimeDelta time;
- time = ProcessFile(fnames[i].c_str(), encoding, isolate, print_tokens,
+ time = ProcessFile(fnames[i].c_str(), encoding,
+ reinterpret_cast<Isolate*>(isolate), print_tokens,
repeat);
baseline_total += time.InMillisecondsF();
}
« no previous file with comments | « src/d8.cc ('k') | tools/parser-shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698