| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 const v8::HeapGraphEdge* prop = lazy_code->GetChild(i); | 353 const v8::HeapGraphEdge* prop = lazy_code->GetChild(i); |
| 354 const v8::HeapGraphNode* node = prop->GetToNode(); | 354 const v8::HeapGraphNode* node = prop->GetToNode(); |
| 355 if (node->GetType() == v8::HeapGraphNode::kArray) { | 355 if (node->GetType() == v8::HeapGraphNode::kArray) { |
| 356 if (HasString(node, "x")) { | 356 if (HasString(node, "x")) { |
| 357 lazy_references_x = true; | 357 lazy_references_x = true; |
| 358 break; | 358 break; |
| 359 } | 359 } |
| 360 } | 360 } |
| 361 } | 361 } |
| 362 CHECK(compiled_references_x); | 362 CHECK(compiled_references_x); |
| 363 if (i::FLAG_lazy && !(i::FLAG_ignition && i::FLAG_ignition_eager)) { | 363 if (i::FLAG_lazy) { |
| 364 CHECK(!lazy_references_x); | 364 CHECK(!lazy_references_x); |
| 365 } | 365 } |
| 366 } | 366 } |
| 367 | 367 |
| 368 | 368 |
| 369 TEST(HeapSnapshotHeapNumbers) { | 369 TEST(HeapSnapshotHeapNumbers) { |
| 370 LocalContext env; | 370 LocalContext env; |
| 371 v8::HandleScope scope(env->GetIsolate()); | 371 v8::HandleScope scope(env->GetIsolate()); |
| 372 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler(); | 372 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler(); |
| 373 CompileRun( | 373 CompileRun( |
| (...skipping 2728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3102 " a[i] = i;\n" | 3102 " a[i] = i;\n" |
| 3103 " for (var i = 0; i < 3; ++i)\n" | 3103 " for (var i = 0; i < 3; ++i)\n" |
| 3104 " a.shift();\n" | 3104 " a.shift();\n" |
| 3105 "}\n"); | 3105 "}\n"); |
| 3106 | 3106 |
| 3107 CcTest::CollectGarbage(v8::internal::NEW_SPACE); | 3107 CcTest::CollectGarbage(v8::internal::NEW_SPACE); |
| 3108 // Should not crash. | 3108 // Should not crash. |
| 3109 | 3109 |
| 3110 heap_profiler->StopSamplingHeapProfiler(); | 3110 heap_profiler->StopSamplingHeapProfiler(); |
| 3111 } | 3111 } |
| OLD | NEW |