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

Side by Side Diff: runtime/vm/compiler_test.cc

Issue 396403002: Fix handle leak in EvalExpressionExhaustCIDs test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « runtime/tests/vm/vm.status ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/class_finalizer.h" 6 #include "vm/class_finalizer.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 117
118 TEST_CASE(EvalExpressionExhaustCIDs) { 118 TEST_CASE(EvalExpressionExhaustCIDs) {
119 Library& lib = Library::Handle(Library::CoreLibrary()); 119 Library& lib = Library::Handle(Library::CoreLibrary());
120 120
121 const String& expression = String::Handle(String::New("3 + 4")); 121 const String& expression = String::Handle(String::New("3 + 4"));
122 Object& val = Object::Handle(); 122 Object& val = Object::Handle();
123 123
124 const intptr_t classTableSize = 1 << RawObject::kClassIdTagSize; 124 const intptr_t classTableSize = 1 << RawObject::kClassIdTagSize;
125 for (intptr_t i = 0; i < classTableSize; i++) { 125 for (intptr_t i = 0; i < classTableSize; i++) {
126 StackZone zone(Isolate::Current());
126 val = lib.Evaluate(expression, Array::empty_array(), Array::empty_array()); 127 val = lib.Evaluate(expression, Array::empty_array(), Array::empty_array());
127 } 128 }
128 129
129 EXPECT(!val.IsNull()); 130 EXPECT(!val.IsNull());
130 EXPECT(!val.IsError()); 131 EXPECT(!val.IsError());
131 EXPECT(val.IsInteger()); 132 EXPECT(val.IsInteger());
132 EXPECT_EQ(7, Integer::Cast(val).AsInt64Value()); 133 EXPECT_EQ(7, Integer::Cast(val).AsInt64Value());
133 } 134 }
134 135
135 } // namespace dart 136 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698