| OLD | NEW |
| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 i::GetProperty(observation_state, "callbackInfoMap")); | 437 i::GetProperty(observation_state, "callbackInfoMap")); |
| 438 i::Handle<i::JSWeakMap> objectInfoMap = | 438 i::Handle<i::JSWeakMap> objectInfoMap = |
| 439 i::Handle<i::JSWeakMap>::cast( | 439 i::Handle<i::JSWeakMap>::cast( |
| 440 i::GetProperty(observation_state, "objectInfoMap")); | 440 i::GetProperty(observation_state, "objectInfoMap")); |
| 441 i::Handle<i::JSWeakMap> notifierObjectInfoMap = | 441 i::Handle<i::JSWeakMap> notifierObjectInfoMap = |
| 442 i::Handle<i::JSWeakMap>::cast( | 442 i::Handle<i::JSWeakMap>::cast( |
| 443 i::GetProperty(observation_state, "notifierObjectInfoMap")); | 443 i::GetProperty(observation_state, "notifierObjectInfoMap")); |
| 444 CHECK_EQ(1, NumberOfElements(callbackInfoMap)); | 444 CHECK_EQ(1, NumberOfElements(callbackInfoMap)); |
| 445 CHECK_EQ(1, NumberOfElements(objectInfoMap)); | 445 CHECK_EQ(1, NumberOfElements(objectInfoMap)); |
| 446 CHECK_EQ(1, NumberOfElements(notifierObjectInfoMap)); | 446 CHECK_EQ(1, NumberOfElements(notifierObjectInfoMap)); |
| 447 HEAP->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask); | 447 i_isolate->heap()->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask); |
| 448 CHECK_EQ(0, NumberOfElements(callbackInfoMap)); | 448 CHECK_EQ(0, NumberOfElements(callbackInfoMap)); |
| 449 CHECK_EQ(0, NumberOfElements(objectInfoMap)); | 449 CHECK_EQ(0, NumberOfElements(objectInfoMap)); |
| 450 CHECK_EQ(0, NumberOfElements(notifierObjectInfoMap)); | 450 CHECK_EQ(0, NumberOfElements(notifierObjectInfoMap)); |
| 451 } | 451 } |
| 452 | 452 |
| 453 | 453 |
| 454 static bool NamedAccessAlwaysAllowed(Local<Object>, Local<Value>, AccessType, | 454 static bool NamedAccessAlwaysAllowed(Local<Object>, Local<Value>, AccessType, |
| 455 Local<Value>) { | 455 Local<Value>) { |
| 456 return true; | 456 return true; |
| 457 } | 457 } |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 instance->Set(String::New("foo"), String::New("bar")); | 709 instance->Set(String::New("foo"), String::New("bar")); |
| 710 CompileRun(""); // trigger delivery | 710 CompileRun(""); // trigger delivery |
| 711 const RecordExpectation expected_records2[] = { | 711 const RecordExpectation expected_records2[] = { |
| 712 { instance, "new", "5", Handle<Value>() }, | 712 { instance, "new", "5", Handle<Value>() }, |
| 713 { instance, "new", "foo", Handle<Value>() } | 713 { instance, "new", "foo", Handle<Value>() } |
| 714 }; | 714 }; |
| 715 EXPECT_RECORDS(CompileRun("records2"), expected_records2); | 715 EXPECT_RECORDS(CompileRun("records2"), expected_records2); |
| 716 } | 716 } |
| 717 CHECK(CompileRun("records")->IsNull()); | 717 CHECK(CompileRun("records")->IsNull()); |
| 718 } | 718 } |
| OLD | NEW |