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 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3590 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3590 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3591 ON_BAILOUT(isolate, "v8::Object::TurnOnAccessCheck()", return); | 3591 ON_BAILOUT(isolate, "v8::Object::TurnOnAccessCheck()", return); |
3592 ENTER_V8(isolate); | 3592 ENTER_V8(isolate); |
3593 i::HandleScope scope(isolate); | 3593 i::HandleScope scope(isolate); |
3594 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); | 3594 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); |
3595 | 3595 |
3596 // When turning on access checks for a global object deoptimize all functions | 3596 // When turning on access checks for a global object deoptimize all functions |
3597 // as optimized code does not always handle access checks. | 3597 // as optimized code does not always handle access checks. |
3598 i::Deoptimizer::DeoptimizeGlobalObject(*obj); | 3598 i::Deoptimizer::DeoptimizeGlobalObject(*obj); |
3599 | 3599 |
3600 i::Handle<i::Map> new_map = | 3600 i::Handle<i::Map> new_map = i::Map::Copy(i::Handle<i::Map>(obj->map())); |
3601 isolate->factory()->CopyMap(i::Handle<i::Map>(obj->map())); | |
3602 new_map->set_is_access_check_needed(true); | 3601 new_map->set_is_access_check_needed(true); |
3603 obj->set_map(*new_map); | 3602 obj->set_map(*new_map); |
3604 } | 3603 } |
3605 | 3604 |
3606 | 3605 |
3607 bool v8::Object::IsDirty() { | 3606 bool v8::Object::IsDirty() { |
3608 return Utils::OpenHandle(this)->IsDirty(); | 3607 return Utils::OpenHandle(this)->IsDirty(); |
3609 } | 3608 } |
3610 | 3609 |
3611 | 3610 |
(...skipping 4040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7652 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7651 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7653 Address callback_address = | 7652 Address callback_address = |
7654 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7653 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7655 VMState<EXTERNAL> state(isolate); | 7654 VMState<EXTERNAL> state(isolate); |
7656 ExternalCallbackScope call_scope(isolate, callback_address); | 7655 ExternalCallbackScope call_scope(isolate, callback_address); |
7657 callback(info); | 7656 callback(info); |
7658 } | 7657 } |
7659 | 7658 |
7660 | 7659 |
7661 } } // namespace v8::internal | 7660 } } // namespace v8::internal |
OLD | NEW |