Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/api.cc

Issue 2467073002: Revert "Create internal fields on global proxy objects" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | src/api-natives.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
6081 // Migrate security handlers from global_template to 6078 // Migrate security handlers from global_template to
6082 // proxy_template. Temporarily removing access check 6079 // proxy_template. Temporarily removing access check
6083 // information from the global template. 6080 // information from the global template.
6084 if (!global_constructor->access_check_info()->IsUndefined(isolate)) { 6081 if (!global_constructor->access_check_info()->IsUndefined(isolate)) {
6085 proxy_constructor->set_access_check_info( 6082 proxy_constructor->set_access_check_info(
6086 global_constructor->access_check_info()); 6083 global_constructor->access_check_info());
6087 proxy_constructor->set_needs_access_check( 6084 proxy_constructor->set_needs_access_check(
6088 global_constructor->needs_access_check()); 6085 global_constructor->needs_access_check());
6089 global_constructor->set_needs_access_check(false); 6086 global_constructor->set_needs_access_check(false);
6090 global_constructor->set_access_check_info( 6087 global_constructor->set_access_check_info(
(...skipping 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after
9640 Address callback_address = 9637 Address callback_address =
9641 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9638 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9642 VMState<EXTERNAL> state(isolate); 9639 VMState<EXTERNAL> state(isolate);
9643 ExternalCallbackScope call_scope(isolate, callback_address); 9640 ExternalCallbackScope call_scope(isolate, callback_address);
9644 callback(info); 9641 callback(info);
9645 } 9642 }
9646 9643
9647 9644
9648 } // namespace internal 9645 } // namespace internal
9649 } // namespace v8 9646 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api-natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698