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

Side by Side Diff: test/cctest/test-object-observe.cc

Issue 291193002: Revert "Fix Heap::IsHeapIterable." (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/mjsunit/regress/regress-373283.js » ('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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 LocalContext context2(CcTest::isolate()); 609 LocalContext context2(CcTest::isolate());
610 context2->SetSecurityToken(foo); 610 context2->SetSecurityToken(foo);
611 context2->Global()->Set(String::NewFromUtf8(CcTest::isolate(), "obj"), 611 context2->Global()->Set(String::NewFromUtf8(CcTest::isolate(), "obj"),
612 instance); 612 instance);
613 CHECK(CompileRun("Object.getNotifier(obj)")->IsObject()); 613 CHECK(CompileRun("Object.getNotifier(obj)")->IsObject());
614 } 614 }
615 } 615 }
616 616
617 617
618 static int GetGlobalObjectsCount() { 618 static int GetGlobalObjectsCount() {
619 CcTest::heap()->EnsureHeapIsIterable();
619 int count = 0; 620 int count = 0;
620 i::HeapIterator it(CcTest::heap()); 621 i::HeapIterator it(CcTest::heap());
621 for (i::HeapObject* object = it.next(); object != NULL; object = it.next()) 622 for (i::HeapObject* object = it.next(); object != NULL; object = it.next())
622 if (object->IsJSGlobalObject()) count++; 623 if (object->IsJSGlobalObject()) count++;
623 return count; 624 return count;
624 } 625 }
625 626
626 627
627 static void CheckSurvivingGlobalObjectsCount(int expected) { 628 static void CheckSurvivingGlobalObjectsCount(int expected) {
628 // We need to collect all garbage twice to be sure that everything 629 // We need to collect all garbage twice to be sure that everything
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 notifier); 703 notifier);
703 CompileRun("var obj2 = {};" 704 CompileRun("var obj2 = {};"
704 "var notifier2 = Object.getNotifier(obj2);" 705 "var notifier2 = Object.getNotifier(obj2);"
705 "notifier2.performChange.call(" 706 "notifier2.performChange.call("
706 "notifier, 'foo', function(){})"); 707 "notifier, 'foo', function(){})");
707 } 708 }
708 709
709 v8::V8::ContextDisposedNotification(); 710 v8::V8::ContextDisposedNotification();
710 CheckSurvivingGlobalObjectsCount(1); 711 CheckSurvivingGlobalObjectsCount(1);
711 } 712 }
OLDNEW
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/mjsunit/regress/regress-373283.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698