| 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 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 v8::HandleScope scope(env->GetIsolate()); | 1574 v8::HandleScope scope(env->GetIsolate()); |
| 1575 CHECK(prop->GetHeapValue()->IsObject()); | 1575 CHECK(prop->GetHeapValue()->IsObject()); |
| 1576 } | 1576 } |
| 1577 CompileRun("delete a.p;"); | 1577 CompileRun("delete a.p;"); |
| 1578 CHECK(prop->GetHeapValue()->IsUndefined()); | 1578 CHECK(prop->GetHeapValue()->IsUndefined()); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 | 1581 |
| 1582 static int StringCmp(const char* ref, i::String* act) { | 1582 static int StringCmp(const char* ref, i::String* act) { |
| 1583 i::SmartArrayPointer<char> s_act = act->ToCString(); | 1583 i::SmartArrayPointer<char> s_act = act->ToCString(); |
| 1584 int result = strcmp(ref, *s_act); | 1584 int result = strcmp(ref, s_act.get()); |
| 1585 if (result != 0) | 1585 if (result != 0) |
| 1586 fprintf(stderr, "Expected: \"%s\", Actual: \"%s\"\n", ref, *s_act); | 1586 fprintf(stderr, "Expected: \"%s\", Actual: \"%s\"\n", ref, s_act.get()); |
| 1587 return result; | 1587 return result; |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 | 1590 |
| 1591 TEST(GetConstructorName) { | 1591 TEST(GetConstructorName) { |
| 1592 LocalContext env; | 1592 LocalContext env; |
| 1593 v8::HandleScope scope(env->GetIsolate()); | 1593 v8::HandleScope scope(env->GetIsolate()); |
| 1594 | 1594 |
| 1595 CompileRun( | 1595 CompileRun( |
| 1596 "function Constructor1() {};\n" | 1596 "function Constructor1() {};\n" |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 | 2309 |
| 2310 AllocationTraceNode* node = | 2310 AllocationTraceNode* node = |
| 2311 FindNode(tracker, Vector<const char*>(names, ARRAY_SIZE(names))); | 2311 FindNode(tracker, Vector<const char*>(names, ARRAY_SIZE(names))); |
| 2312 CHECK_NE(NULL, node); | 2312 CHECK_NE(NULL, node); |
| 2313 CHECK_LT(node->allocation_count(), 100); | 2313 CHECK_LT(node->allocation_count(), 100); |
| 2314 | 2314 |
| 2315 CcTest::heap()->DisableInlineAllocation(); | 2315 CcTest::heap()->DisableInlineAllocation(); |
| 2316 heap_profiler->StopTrackingHeapObjects(); | 2316 heap_profiler->StopTrackingHeapObjects(); |
| 2317 } | 2317 } |
| 2318 } | 2318 } |
| OLD | NEW |