| 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 3582 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3593   ENTER_V8(isolate); | 3593   ENTER_V8(isolate); | 
| 3594   i::HandleScope scope(isolate); | 3594   i::HandleScope scope(isolate); | 
| 3595   i::Handle<i::JSObject> obj = Utils::OpenHandle(this); | 3595   i::Handle<i::JSObject> obj = Utils::OpenHandle(this); | 
| 3596 | 3596 | 
| 3597   // When turning on access checks for a global object deoptimize all functions | 3597   // When turning on access checks for a global object deoptimize all functions | 
| 3598   // as optimized code does not always handle access checks. | 3598   // as optimized code does not always handle access checks. | 
| 3599   i::Deoptimizer::DeoptimizeGlobalObject(*obj); | 3599   i::Deoptimizer::DeoptimizeGlobalObject(*obj); | 
| 3600 | 3600 | 
| 3601   i::Handle<i::Map> new_map = i::Map::Copy(i::Handle<i::Map>(obj->map())); | 3601   i::Handle<i::Map> new_map = i::Map::Copy(i::Handle<i::Map>(obj->map())); | 
| 3602   new_map->set_is_access_check_needed(true); | 3602   new_map->set_is_access_check_needed(true); | 
| 3603   obj->set_map(*new_map); | 3603   i::JSObject::MigrateToMap(obj, new_map); | 
| 3604 } | 3604 } | 
| 3605 | 3605 | 
| 3606 | 3606 | 
| 3607 bool v8::Object::IsDirty() { | 3607 bool v8::Object::IsDirty() { | 
| 3608   return Utils::OpenHandle(this)->IsDirty(); | 3608   return Utils::OpenHandle(this)->IsDirty(); | 
| 3609 } | 3609 } | 
| 3610 | 3610 | 
| 3611 | 3611 | 
| 3612 Local<v8::Object> v8::Object::Clone() { | 3612 Local<v8::Object> v8::Object::Clone() { | 
| 3613   i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3613   i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 
| (...skipping 4017 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7631   Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7631   Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 
| 7632   Address callback_address = | 7632   Address callback_address = | 
| 7633       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7633       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 
| 7634   VMState<EXTERNAL> state(isolate); | 7634   VMState<EXTERNAL> state(isolate); | 
| 7635   ExternalCallbackScope call_scope(isolate, callback_address); | 7635   ExternalCallbackScope call_scope(isolate, callback_address); | 
| 7636   callback(info); | 7636   callback(info); | 
| 7637 } | 7637 } | 
| 7638 | 7638 | 
| 7639 | 7639 | 
| 7640 } }  // namespace v8::internal | 7640 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|