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

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

Issue 24169005: remove HEAP from tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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.h ('k') | test/cctest/test-alloc.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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 static void CheckAccessorArgsCorrect( 310 static void CheckAccessorArgsCorrect(
311 Local<String> name, 311 Local<String> name,
312 const v8::PropertyCallbackInfo<v8::Value>& info) { 312 const v8::PropertyCallbackInfo<v8::Value>& info) {
313 CHECK(info.GetIsolate() == CcTest::isolate()); 313 CHECK(info.GetIsolate() == CcTest::isolate());
314 CHECK(info.This() == info.Holder()); 314 CHECK(info.This() == info.Holder());
315 CHECK(info.Data()->Equals(v8::String::New("data"))); 315 CHECK(info.Data()->Equals(v8::String::New("data")));
316 ApiTestFuzzer::Fuzz(); 316 ApiTestFuzzer::Fuzz();
317 CHECK(info.GetIsolate() == CcTest::isolate()); 317 CHECK(info.GetIsolate() == CcTest::isolate());
318 CHECK(info.This() == info.Holder()); 318 CHECK(info.This() == info.Holder());
319 CHECK(info.Data()->Equals(v8::String::New("data"))); 319 CHECK(info.Data()->Equals(v8::String::New("data")));
320 HEAP->CollectAllGarbage(i::Heap::kNoGCFlags); 320 CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
321 CHECK(info.GetIsolate() == CcTest::isolate()); 321 CHECK(info.GetIsolate() == CcTest::isolate());
322 CHECK(info.This() == info.Holder()); 322 CHECK(info.This() == info.Holder());
323 CHECK(info.Data()->Equals(v8::String::New("data"))); 323 CHECK(info.Data()->Equals(v8::String::New("data")));
324 info.GetReturnValue().Set(17); 324 info.GetReturnValue().Set(17);
325 } 325 }
326 326
327 327
328 THREADED_TEST(DirectCall) { 328 THREADED_TEST(DirectCall) {
329 LocalContext context; 329 LocalContext context;
330 v8::HandleScope scope(context->GetIsolate()); 330 v8::HandleScope scope(context->GetIsolate());
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 v8::HandleScope scope(isolate); 560 v8::HandleScope scope(isolate);
561 v8::Handle<v8::Function> fun = v8::Function::New(isolate, handle_property); 561 v8::Handle<v8::Function> fun = v8::Function::New(isolate, handle_property);
562 LocalContext switch_context; 562 LocalContext switch_context;
563 switch_context->Global()->Set(v8_str("fun"), fun); 563 switch_context->Global()->Set(v8_str("fun"), fun);
564 v8::TryCatch try_catch; 564 v8::TryCatch try_catch;
565 CompileRun( 565 CompileRun(
566 "var o = Object.create(null, { n: { get:fun } });" 566 "var o = Object.create(null, { n: { get:fun } });"
567 "for (var i = 0; i < 10; i++) o.n;"); 567 "for (var i = 0; i < 10; i++) o.n;");
568 CHECK(!try_catch.HasCaught()); 568 CHECK(!try_catch.HasCaught());
569 } 569 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698