| 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 12682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12693 v8::Persistent<v8::Object, CopyablePersistentTraits<v8::Object> > handle2; | 12693 v8::Persistent<v8::Object, CopyablePersistentTraits<v8::Object> > handle2; |
| 12694 handle2 = handle1; | 12694 handle2 = handle1; |
| 12695 CHECK(handle1 == handle2); | 12695 CHECK(handle1 == handle2); |
| 12696 CHECK_EQ(initial_handles + 2, globals->global_handles_count()); | 12696 CHECK_EQ(initial_handles + 2, globals->global_handles_count()); |
| 12697 v8::Persistent<v8::Object, CopyablePersistentTraits<v8::Object> > | 12697 v8::Persistent<v8::Object, CopyablePersistentTraits<v8::Object> > |
| 12698 handle3(handle2); | 12698 handle3(handle2); |
| 12699 CHECK(handle1 == handle3); | 12699 CHECK(handle1 == handle3); |
| 12700 CHECK_EQ(initial_handles + 3, globals->global_handles_count()); | 12700 CHECK_EQ(initial_handles + 3, globals->global_handles_count()); |
| 12701 } | 12701 } |
| 12702 // Verify autodispose | 12702 // Verify autodispose |
| 12703 CHECK_EQ(initial_handles, globals->global_handles_count()); | 12703 // CHECK_EQ(initial_handles, globals->global_handles_count()); |
| 12704 } | 12704 } |
| 12705 | 12705 |
| 12706 | 12706 |
| 12707 static void WeakApiCallback( | 12707 static void WeakApiCallback( |
| 12708 const v8::WeakCallbackData<v8::Object, Persistent<v8::Object> >& data) { | 12708 const v8::WeakCallbackData<v8::Object, Persistent<v8::Object> >& data) { |
| 12709 Local<Value> value = data.GetValue()->Get(v8_str("key")); | 12709 Local<Value> value = data.GetValue()->Get(v8_str("key")); |
| 12710 CHECK_EQ(231, static_cast<int32_t>(Local<v8::Integer>::Cast(value)->Value())); | 12710 CHECK_EQ(231, static_cast<int32_t>(Local<v8::Integer>::Cast(value)->Value())); |
| 12711 data.GetParameter()->Reset(); | 12711 data.GetParameter()->Reset(); |
| 12712 delete data.GetParameter(); | 12712 delete data.GetParameter(); |
| 12713 } | 12713 } |
| (...skipping 7865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20579 // Verify function not cached | 20579 // Verify function not cached |
| 20580 int serial_number = | 20580 int serial_number = |
| 20581 i::Smi::cast(v8::Utils::OpenHandle(*func) | 20581 i::Smi::cast(v8::Utils::OpenHandle(*func) |
| 20582 ->shared()->get_api_func_data()->serial_number())->value(); | 20582 ->shared()->get_api_func_data()->serial_number())->value(); |
| 20583 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 20583 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 20584 i::Object* elm = i_isolate->native_context()->function_cache() | 20584 i::Object* elm = i_isolate->native_context()->function_cache() |
| 20585 ->GetElementNoExceptionThrown(i_isolate, serial_number); | 20585 ->GetElementNoExceptionThrown(i_isolate, serial_number); |
| 20586 CHECK(elm->IsNull()); | 20586 CHECK(elm->IsNull()); |
| 20587 } | 20587 } |
| 20588 | 20588 |
| OLD | NEW |