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

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

Issue 238353015: Simplify v8/Isolate teardown. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Tiny serializer fix after recent changes. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/cctest.cc ('k') | test/cctest/test-microtask-delivery.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 22295 matching lines...) Expand 10 before | Expand all | Expand 10 after
22306 CHECK_EQ("V8.Test", last_event_message); 22306 CHECK_EQ("V8.Test", last_event_message);
22307 CHECK_EQ(0, last_event_status); 22307 CHECK_EQ(0, last_event_status);
22308 histogramTimer->Stop(); 22308 histogramTimer->Stop();
22309 CHECK_EQ("V8.Test", last_event_message); 22309 CHECK_EQ("V8.Test", last_event_message);
22310 CHECK_EQ(1, last_event_status); 22310 CHECK_EQ(1, last_event_status);
22311 } 22311 }
22312 22312
22313 22313
22314 TEST(Promises) { 22314 TEST(Promises) {
22315 i::FLAG_harmony_promises = true; 22315 i::FLAG_harmony_promises = true;
22316 i::FlagList::EnforceFlagImplications();
22316 22317
22317 LocalContext context; 22318 LocalContext context;
22318 v8::Isolate* isolate = context->GetIsolate(); 22319 v8::Isolate* isolate = context->GetIsolate();
22319 v8::HandleScope scope(isolate); 22320 v8::HandleScope scope(isolate);
22320 Handle<Object> global = context->Global(); 22321 Handle<Object> global = context->Global();
22321 22322
22322 // Creation. 22323 // Creation.
22323 Handle<v8::Promise::Resolver> pr = v8::Promise::Resolver::New(isolate); 22324 Handle<v8::Promise::Resolver> pr = v8::Promise::Resolver::New(isolate);
22324 Handle<v8::Promise::Resolver> rr = v8::Promise::Resolver::New(isolate); 22325 Handle<v8::Promise::Resolver> rr = v8::Promise::Resolver::New(isolate);
22325 Handle<v8::Promise> p = pr->GetPromise(); 22326 Handle<v8::Promise> p = pr->GetPromise();
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
22492 v8::internal::FLAG_stack_size = 150; 22493 v8::internal::FLAG_stack_size = 150;
22493 LocalContext current; 22494 LocalContext current;
22494 v8::Isolate* isolate = current->GetIsolate(); 22495 v8::Isolate* isolate = current->GetIsolate();
22495 v8::HandleScope scope(isolate); 22496 v8::HandleScope scope(isolate);
22496 V8::SetCaptureStackTraceForUncaughtExceptions( 22497 V8::SetCaptureStackTraceForUncaughtExceptions(
22497 true, 10, v8::StackTrace::kDetailed); 22498 true, 10, v8::StackTrace::kDetailed);
22498 v8::TryCatch try_catch; 22499 v8::TryCatch try_catch;
22499 CompileRun("(function f(x) { f(x+1); })(0)"); 22500 CompileRun("(function f(x) { f(x+1); })(0)");
22500 CHECK(try_catch.HasCaught()); 22501 CHECK(try_catch.HasCaught());
22501 } 22502 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.cc ('k') | test/cctest/test-microtask-delivery.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698