OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 3594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3605 ON_BAILOUT(isolate, | 3605 ON_BAILOUT(isolate, |
3606 "v8::Object::GetRealNamedPropertyInPrototypeChain()", | 3606 "v8::Object::GetRealNamedPropertyInPrototypeChain()", |
3607 return Local<Value>()); | 3607 return Local<Value>()); |
3608 ENTER_V8(isolate); | 3608 ENTER_V8(isolate); |
3609 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this); | 3609 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this); |
3610 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); | 3610 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); |
3611 i::PrototypeIterator iter(isolate, self_obj); | 3611 i::PrototypeIterator iter(isolate, self_obj); |
3612 if (iter.IsAtEnd()) return Local<Value>(); | 3612 if (iter.IsAtEnd()) return Local<Value>(); |
3613 i::Handle<i::Object> proto = i::PrototypeIterator::GetCurrent(iter); | 3613 i::Handle<i::Object> proto = i::PrototypeIterator::GetCurrent(iter); |
3614 i::LookupIterator it(self_obj, key_obj, i::Handle<i::JSReceiver>::cast(proto), | 3614 i::LookupIterator it(self_obj, key_obj, i::Handle<i::JSReceiver>::cast(proto), |
3615 i::LookupIterator::PROTOTYPE_CHAIN_PROPERTY); | 3615 i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); |
3616 return GetPropertyByLookup(&it); | 3616 return GetPropertyByLookup(&it); |
3617 } | 3617 } |
3618 | 3618 |
3619 | 3619 |
3620 Local<Value> v8::Object::GetRealNamedProperty(Handle<String> key) { | 3620 Local<Value> v8::Object::GetRealNamedProperty(Handle<String> key) { |
3621 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3621 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3622 ON_BAILOUT(isolate, "v8::Object::GetRealNamedProperty()", | 3622 ON_BAILOUT(isolate, "v8::Object::GetRealNamedProperty()", |
3623 return Local<Value>()); | 3623 return Local<Value>()); |
3624 ENTER_V8(isolate); | 3624 ENTER_V8(isolate); |
3625 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this); | 3625 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this); |
3626 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); | 3626 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); |
3627 i::LookupIterator it(self_obj, key_obj, | 3627 i::LookupIterator it(self_obj, key_obj, |
3628 i::LookupIterator::PROTOTYPE_CHAIN_PROPERTY); | 3628 i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); |
3629 return GetPropertyByLookup(&it); | 3629 return GetPropertyByLookup(&it); |
3630 } | 3630 } |
3631 | 3631 |
3632 | 3632 |
3633 // Turns on access checks by copying the map and setting the check flag. | 3633 // Turns on access checks by copying the map and setting the check flag. |
3634 // Because the object gets a new map, existing inline cache caching | 3634 // Because the object gets a new map, existing inline cache caching |
3635 // the old map of this object will fail. | 3635 // the old map of this object will fail. |
3636 void v8::Object::TurnOnAccessCheck() { | 3636 void v8::Object::TurnOnAccessCheck() { |
3637 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3637 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3638 ON_BAILOUT(isolate, "v8::Object::TurnOnAccessCheck()", return); | 3638 ON_BAILOUT(isolate, "v8::Object::TurnOnAccessCheck()", return); |
(...skipping 3987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7627 Address callback_address = | 7627 Address callback_address = |
7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7629 VMState<EXTERNAL> state(isolate); | 7629 VMState<EXTERNAL> state(isolate); |
7630 ExternalCallbackScope call_scope(isolate, callback_address); | 7630 ExternalCallbackScope call_scope(isolate, callback_address); |
7631 callback(info); | 7631 callback(info); |
7632 } | 7632 } |
7633 | 7633 |
7634 | 7634 |
7635 } } // namespace v8::internal | 7635 } } // namespace v8::internal |
OLD | NEW |