| 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 6057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6068 // Create a fresh template for the global proxy object. | 6068 // Create a fresh template for the global proxy object. |
| 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( |
| 6079 v8::Context::kProxyInternalFieldCount); |
| 6080 |
| 6078 // Migrate security handlers from global_template to | 6081 // Migrate security handlers from global_template to |
| 6079 // proxy_template. Temporarily removing access check | 6082 // proxy_template. Temporarily removing access check |
| 6080 // information from the global template. | 6083 // information from the global template. |
| 6081 if (!global_constructor->access_check_info()->IsUndefined(isolate)) { | 6084 if (!global_constructor->access_check_info()->IsUndefined(isolate)) { |
| 6082 proxy_constructor->set_access_check_info( | 6085 proxy_constructor->set_access_check_info( |
| 6083 global_constructor->access_check_info()); | 6086 global_constructor->access_check_info()); |
| 6084 proxy_constructor->set_needs_access_check( | 6087 proxy_constructor->set_needs_access_check( |
| 6085 global_constructor->needs_access_check()); | 6088 global_constructor->needs_access_check()); |
| 6086 global_constructor->set_needs_access_check(false); | 6089 global_constructor->set_needs_access_check(false); |
| 6087 global_constructor->set_access_check_info( | 6090 global_constructor->set_access_check_info( |
| (...skipping 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9637 Address callback_address = | 9640 Address callback_address = |
| 9638 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9641 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 9639 VMState<EXTERNAL> state(isolate); | 9642 VMState<EXTERNAL> state(isolate); |
| 9640 ExternalCallbackScope call_scope(isolate, callback_address); | 9643 ExternalCallbackScope call_scope(isolate, callback_address); |
| 9641 callback(info); | 9644 callback(info); |
| 9642 } | 9645 } |
| 9643 | 9646 |
| 9644 | 9647 |
| 9645 } // namespace internal | 9648 } // namespace internal |
| 9646 } // namespace v8 | 9649 } // namespace v8 |
| OLD | NEW |