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 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3767 // When turning on access checks for a global object deoptimize all functions | 3767 // When turning on access checks for a global object deoptimize all functions |
3768 // as optimized code does not always handle access checks. | 3768 // as optimized code does not always handle access checks. |
3769 i::Deoptimizer::DeoptimizeGlobalObject(*obj); | 3769 i::Deoptimizer::DeoptimizeGlobalObject(*obj); |
3770 | 3770 |
3771 i::Handle<i::Map> new_map = i::Map::Copy(i::Handle<i::Map>(obj->map())); | 3771 i::Handle<i::Map> new_map = i::Map::Copy(i::Handle<i::Map>(obj->map())); |
3772 new_map->set_is_access_check_needed(true); | 3772 new_map->set_is_access_check_needed(true); |
3773 i::JSObject::MigrateToMap(obj, new_map); | 3773 i::JSObject::MigrateToMap(obj, new_map); |
3774 } | 3774 } |
3775 | 3775 |
3776 | 3776 |
3777 bool v8::Object::IsDirty() { | |
3778 return Utils::OpenHandle(this)->IsDirty(); | |
3779 } | |
3780 | |
3781 | |
3782 Local<v8::Object> v8::Object::Clone() { | 3777 Local<v8::Object> v8::Object::Clone() { |
3783 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3778 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3784 ON_BAILOUT(isolate, "v8::Object::Clone()", return Local<Object>()); | 3779 ON_BAILOUT(isolate, "v8::Object::Clone()", return Local<Object>()); |
3785 ENTER_V8(isolate); | 3780 ENTER_V8(isolate); |
3786 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3781 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3787 EXCEPTION_PREAMBLE(isolate); | 3782 EXCEPTION_PREAMBLE(isolate); |
3788 i::Handle<i::JSObject> result = isolate->factory()->CopyJSObject(self); | 3783 i::Handle<i::JSObject> result = isolate->factory()->CopyJSObject(self); |
3789 has_pending_exception = result.is_null(); | 3784 has_pending_exception = result.is_null(); |
3790 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); | 3785 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); |
3791 return Utils::ToLocal(result); | 3786 return Utils::ToLocal(result); |
(...skipping 3920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7712 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7707 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7713 Address callback_address = | 7708 Address callback_address = |
7714 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7709 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7715 VMState<EXTERNAL> state(isolate); | 7710 VMState<EXTERNAL> state(isolate); |
7716 ExternalCallbackScope call_scope(isolate, callback_address); | 7711 ExternalCallbackScope call_scope(isolate, callback_address); |
7717 callback(info); | 7712 callback(info); |
7718 } | 7713 } |
7719 | 7714 |
7720 | 7715 |
7721 } } // namespace v8::internal | 7716 } } // namespace v8::internal |
OLD | NEW |