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

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

Issue 267383002: Reland "Removed default Isolate." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/cctest.cc ('k') | no next file » | 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 19251 matching lines...) Expand 10 before | Expand all | Expand 10 after
19262 // Reset the failed access check callback so it does not influence 19262 // Reset the failed access check callback so it does not influence
19263 // the other tests. 19263 // the other tests.
19264 v8::V8::SetFailedAccessCheckCallbackFunction(NULL); 19264 v8::V8::SetFailedAccessCheckCallbackFunction(NULL);
19265 } 19265 }
19266 19266
19267 19267
19268 TEST(IsolateNewDispose) { 19268 TEST(IsolateNewDispose) {
19269 v8::Isolate* current_isolate = CcTest::isolate(); 19269 v8::Isolate* current_isolate = CcTest::isolate();
19270 v8::Isolate* isolate = v8::Isolate::New(); 19270 v8::Isolate* isolate = v8::Isolate::New();
19271 CHECK(isolate != NULL); 19271 CHECK(isolate != NULL);
19272 CHECK(!reinterpret_cast<i::Isolate*>(isolate)->IsDefaultIsolate());
19273 CHECK(current_isolate != isolate); 19272 CHECK(current_isolate != isolate);
19274 CHECK(current_isolate == CcTest::isolate()); 19273 CHECK(current_isolate == CcTest::isolate());
19275 19274
19276 v8::V8::SetFatalErrorHandler(StoringErrorCallback); 19275 v8::V8::SetFatalErrorHandler(StoringErrorCallback);
19277 last_location = last_message = NULL; 19276 last_location = last_message = NULL;
19278 isolate->Dispose(); 19277 isolate->Dispose();
19279 CHECK_EQ(last_location, NULL); 19278 CHECK_EQ(last_location, NULL);
19280 CHECK_EQ(last_message, NULL); 19279 CHECK_EQ(last_message, NULL);
19281 } 19280 }
19282 19281
(...skipping 3232 matching lines...) Expand 10 before | Expand all | Expand 10 after
22515 v8::internal::FLAG_stack_size = 150; 22514 v8::internal::FLAG_stack_size = 150;
22516 LocalContext current; 22515 LocalContext current;
22517 v8::Isolate* isolate = current->GetIsolate(); 22516 v8::Isolate* isolate = current->GetIsolate();
22518 v8::HandleScope scope(isolate); 22517 v8::HandleScope scope(isolate);
22519 V8::SetCaptureStackTraceForUncaughtExceptions( 22518 V8::SetCaptureStackTraceForUncaughtExceptions(
22520 true, 10, v8::StackTrace::kDetailed); 22519 true, 10, v8::StackTrace::kDetailed);
22521 v8::TryCatch try_catch; 22520 v8::TryCatch try_catch;
22522 CompileRun("(function f(x) { f(x+1); })(0)"); 22521 CompileRun("(function f(x) { f(x+1); })(0)");
22523 CHECK(try_catch.HasCaught()); 22522 CHECK(try_catch.HasCaught());
22524 } 22523 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698