File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -521,10 +521,8 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
521521 depth_acc = m_literal->depth () + 1 ;
522522 }
523523 }
524-
525- // New handle scope here, needs to be after BuildContants().
526- HandleScope scope (isolate);
527524 Handle<Object> boilerplate_value = GetBoilerplateValue (element, isolate);
525+
528526 if (boilerplate_value->IsTheHole ()) {
529527 is_holey = true ;
530528 continue ;
Original file line number Diff line number Diff line change @@ -92,19 +92,7 @@ HandleScope::HandleScope(Isolate* isolate) {
9292
9393
9494HandleScope::~HandleScope () {
95- #ifdef DEBUG
96- if (FLAG_check_handle_count) {
97- int before = NumberOfHandles (isolate_);
98- CloseScope (isolate_, prev_next_, prev_limit_);
99- int after = NumberOfHandles (isolate_);
100- DCHECK (after - before < kCheckHandleThreshold );
101- DCHECK (before < kCheckHandleThreshold );
102- } else {
103- #endif // DEBUG
104- CloseScope (isolate_, prev_next_, prev_limit_);
105- #ifdef DEBUG
106- }
107- #endif // DEBUG
95+ CloseScope (isolate_, prev_next_, prev_limit_);
10896}
10997
11098
Original file line number Diff line number Diff line change @@ -208,8 +208,6 @@ class HandleScope {
208208
209209 Isolate* isolate () { return isolate_; }
210210
211- static const int kCheckHandleThreshold = 16 * 1024 ;
212-
213211 private:
214212 // Prevent heap allocation or illegal handle scopes.
215213 HandleScope (const HandleScope&);
Original file line number Diff line number Diff line change @@ -646,8 +646,8 @@ void Heap::GarbageCollectionEpilogue() {
646646 if (FLAG_print_handles) PrintHandles ();
647647 if (FLAG_gc_verbose) Print ();
648648 if (FLAG_code_stats) ReportCodeStatistics (" After GC" );
649- if (FLAG_check_handle_count) CheckHandleCount ();
650649#endif
650+ if (FLAG_check_handle_count) CheckHandleCount ();
651651 if (FLAG_deopt_every_n_garbage_collections > 0 ) {
652652 // TODO(jkummerow/ulan/jarin): This is not safe! We can't assume that
653653 // the topmost optimized frame can be deoptimized safely, because it
@@ -5957,9 +5957,7 @@ void Heap::PrintHandles() {
59575957class CheckHandleCountVisitor : public ObjectVisitor {
59585958 public:
59595959 CheckHandleCountVisitor () : handle_count_(0 ) {}
5960- ~CheckHandleCountVisitor () {
5961- CHECK (handle_count_ < HandleScope::kCheckHandleThreshold );
5962- }
5960+ ~CheckHandleCountVisitor () { CHECK (handle_count_ < 2000 ); }
59635961 void VisitPointers (Object** start, Object** end) {
59645962 handle_count_ += end - start;
59655963 }
Original file line number Diff line number Diff line change @@ -191,7 +191,6 @@ MaybeHandle<Object> Runtime::CreateArrayLiteralBoilerplate(
191191 isolate->factory ()->CopyFixedArray (fixed_array_values);
192192 copied_elements_values = fixed_array_values_copy;
193193 for (int i = 0 ; i < fixed_array_values->length (); i++) {
194- HandleScope scope (isolate);
195194 if (fixed_array_values->get (i)->IsFixedArray ()) {
196195 // The value contains the constant_properties of a
197196 // simple object or array literal.
Original file line number Diff line number Diff line change @@ -1505,7 +1505,6 @@ struct Tests : Rep {
15051505 void Union3 () {
15061506 // Monotonicity: T1->Is(T2) or T1->Is(T3) implies T1->Is(Union(T2, T3))
15071507 for (TypeIterator it1 = T.types .begin (); it1 != T.types .end (); ++it1) {
1508- HandleScope scope (isolate);
15091508 for (TypeIterator it2 = T.types .begin (); it2 != T.types .end (); ++it2) {
15101509 for (TypeIterator it3 = it2; it3 != T.types .end (); ++it3) {
15111510 TypeHandle type1 = *it1;
@@ -1758,7 +1757,6 @@ struct Tests : Rep {
17581757
17591758 // Monotonicity: T1->Is(T2) and T1->Is(T3) implies T1->Is(Intersect(T2, T3))
17601759 for (TypeIterator it1 = T.types .begin (); it1 != T.types .end (); ++it1) {
1761- HandleScope scope (isolate);
17621760 for (TypeIterator it2 = T.types .begin (); it2 != T.types .end (); ++it2) {
17631761 for (TypeIterator it3 = T.types .begin (); it3 != T.types .end (); ++it3) {
17641762 TypeHandle type1 = *it1;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments