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

Side by Side Diff: test/cctest/test-log.cc

Issue 1154423004: Update all callsites of the TryCatch ctor to pass an Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 | « test/cctest/test-heap.cc ('k') | test/cctest/test-parsing.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 i::Vector<const char> log( 475 i::Vector<const char> log(
476 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); 476 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
477 CHECK(exists); 477 CHECK(exists);
478 v8::Handle<v8::String> log_str = v8::String::NewFromUtf8( 478 v8::Handle<v8::String> log_str = v8::String::NewFromUtf8(
479 isolate, log.start(), v8::String::kNormalString, log.length()); 479 isolate, log.start(), v8::String::kNormalString, log.length());
480 initialize_logger.env()->Global()->Set(v8_str("_log"), log_str); 480 initialize_logger.env()->Global()->Set(v8_str("_log"), log_str);
481 481
482 i::Vector<const char> source = TestSources::GetScriptsSource(); 482 i::Vector<const char> source = TestSources::GetScriptsSource();
483 v8::Handle<v8::String> source_str = v8::String::NewFromUtf8( 483 v8::Handle<v8::String> source_str = v8::String::NewFromUtf8(
484 isolate, source.start(), v8::String::kNormalString, source.length()); 484 isolate, source.start(), v8::String::kNormalString, source.length());
485 v8::TryCatch try_catch; 485 v8::TryCatch try_catch(isolate);
486 v8::Handle<v8::Script> script = CompileWithOrigin(source_str, ""); 486 v8::Handle<v8::Script> script = CompileWithOrigin(source_str, "");
487 if (script.IsEmpty()) { 487 if (script.IsEmpty()) {
488 v8::String::Utf8Value exception(try_catch.Exception()); 488 v8::String::Utf8Value exception(try_catch.Exception());
489 printf("compile: %s\n", *exception); 489 printf("compile: %s\n", *exception);
490 CHECK(false); 490 CHECK(false);
491 } 491 }
492 v8::Handle<v8::Value> result = script->Run(); 492 v8::Handle<v8::Value> result = script->Run();
493 if (result.IsEmpty()) { 493 if (result.IsEmpty()) {
494 v8::String::Utf8Value exception(try_catch.Exception()); 494 v8::String::Utf8Value exception(try_catch.Exception());
495 printf("run: %s\n", *exception); 495 printf("run: %s\n", *exception);
(...skipping 28 matching lines...) Expand all
524 CHECK(exists); 524 CHECK(exists);
525 i::EmbeddedVector<char, 100> ref_data; 525 i::EmbeddedVector<char, 100> ref_data;
526 i::SNPrintF(ref_data, "v8-version,%d,%d,%d,%d,%d", i::Version::GetMajor(), 526 i::SNPrintF(ref_data, "v8-version,%d,%d,%d,%d,%d", i::Version::GetMajor(),
527 i::Version::GetMinor(), i::Version::GetBuild(), 527 i::Version::GetMinor(), i::Version::GetBuild(),
528 i::Version::GetPatch(), i::Version::IsCandidate()); 528 i::Version::GetPatch(), i::Version::IsCandidate());
529 CHECK(StrNStr(log.start(), ref_data.start(), log.length())); 529 CHECK(StrNStr(log.start(), ref_data.start(), log.length()));
530 log.Dispose(); 530 log.Dispose();
531 } 531 }
532 isolate->Dispose(); 532 isolate->Dispose();
533 } 533 }
OLDNEW
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698