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 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3682 return Utils::ToLocal(i::Handle<i::Context>(context)); | 3682 return Utils::ToLocal(i::Handle<i::Context>(context)); |
3683 } | 3683 } |
3684 | 3684 |
3685 | 3685 |
3686 int v8::Object::GetIdentityHash() { | 3686 int v8::Object::GetIdentityHash() { |
3687 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3687 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3688 ON_BAILOUT(isolate, "v8::Object::GetIdentityHash()", return 0); | 3688 ON_BAILOUT(isolate, "v8::Object::GetIdentityHash()", return 0); |
3689 ENTER_V8(isolate); | 3689 ENTER_V8(isolate); |
3690 i::HandleScope scope(isolate); | 3690 i::HandleScope scope(isolate); |
3691 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3691 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3692 return i::JSObject::GetIdentityHash(self); | 3692 return i::Handle<i::Smi>::cast( |
| 3693 i::JSReceiver::GetOrCreateIdentityHash(self))->value(); |
3693 } | 3694 } |
3694 | 3695 |
3695 | 3696 |
3696 bool v8::Object::SetHiddenValue(v8::Handle<v8::String> key, | 3697 bool v8::Object::SetHiddenValue(v8::Handle<v8::String> key, |
3697 v8::Handle<v8::Value> value) { | 3698 v8::Handle<v8::Value> value) { |
3698 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3699 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3699 ON_BAILOUT(isolate, "v8::Object::SetHiddenValue()", return false); | 3700 ON_BAILOUT(isolate, "v8::Object::SetHiddenValue()", return false); |
3700 if (value.IsEmpty()) return DeleteHiddenValue(key); | 3701 if (value.IsEmpty()) return DeleteHiddenValue(key); |
3701 ENTER_V8(isolate); | 3702 ENTER_V8(isolate); |
3702 i::HandleScope scope(isolate); | 3703 i::HandleScope scope(isolate); |
(...skipping 3868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7571 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7572 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7572 Address callback_address = | 7573 Address callback_address = |
7573 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7574 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7574 VMState<EXTERNAL> state(isolate); | 7575 VMState<EXTERNAL> state(isolate); |
7575 ExternalCallbackScope call_scope(isolate, callback_address); | 7576 ExternalCallbackScope call_scope(isolate, callback_address); |
7576 callback(info); | 7577 callback(info); |
7577 } | 7578 } |
7578 | 7579 |
7579 | 7580 |
7580 } } // namespace v8::internal | 7581 } } // namespace v8::internal |
OLD | NEW |