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 6058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6069 proxy_template = ObjectTemplate::New( | 6069 proxy_template = ObjectTemplate::New( |
6070 reinterpret_cast<v8::Isolate*>(isolate)); | 6070 reinterpret_cast<v8::Isolate*>(isolate)); |
6071 proxy_constructor = EnsureConstructor(isolate, *proxy_template); | 6071 proxy_constructor = EnsureConstructor(isolate, *proxy_template); |
6072 | 6072 |
6073 // Set the global template to be the prototype template of | 6073 // Set the global template to be the prototype template of |
6074 // global proxy template. | 6074 // global proxy template. |
6075 proxy_constructor->set_prototype_template( | 6075 proxy_constructor->set_prototype_template( |
6076 *Utils::OpenHandle(*global_template)); | 6076 *Utils::OpenHandle(*global_template)); |
6077 | 6077 |
6078 proxy_template->SetInternalFieldCount( | 6078 proxy_template->SetInternalFieldCount( |
6079 v8::Context::kProxyInternalFieldCount); | 6079 global_template->InternalFieldCount()); |
6080 | 6080 |
6081 // Migrate security handlers from global_template to | 6081 // Migrate security handlers from global_template to |
6082 // proxy_template. Temporarily removing access check | 6082 // proxy_template. Temporarily removing access check |
6083 // information from the global template. | 6083 // information from the global template. |
6084 if (!global_constructor->access_check_info()->IsUndefined(isolate)) { | 6084 if (!global_constructor->access_check_info()->IsUndefined(isolate)) { |
6085 proxy_constructor->set_access_check_info( | 6085 proxy_constructor->set_access_check_info( |
6086 global_constructor->access_check_info()); | 6086 global_constructor->access_check_info()); |
6087 proxy_constructor->set_needs_access_check( | 6087 proxy_constructor->set_needs_access_check( |
6088 global_constructor->needs_access_check()); | 6088 global_constructor->needs_access_check()); |
6089 global_constructor->set_needs_access_check(false); | 6089 global_constructor->set_needs_access_check(false); |
(...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9640 Address callback_address = | 9640 Address callback_address = |
9641 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9641 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9642 VMState<EXTERNAL> state(isolate); | 9642 VMState<EXTERNAL> state(isolate); |
9643 ExternalCallbackScope call_scope(isolate, callback_address); | 9643 ExternalCallbackScope call_scope(isolate, callback_address); |
9644 callback(info); | 9644 callback(info); |
9645 } | 9645 } |
9646 | 9646 |
9647 | 9647 |
9648 } // namespace internal | 9648 } // namespace internal |
9649 } // namespace v8 | 9649 } // namespace v8 |
OLD | NEW |