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

Side by Side Diff: src/api.cc

Issue 2533223002: Copy dictionary keys and values in enumeration in TransferNamedProperties (Closed)
Patch Set: Created 4 years 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 | « no previous file | src/bootstrapper.cc » ('j') | src/objects.cc » ('J')
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 6253 matching lines...) Expand 10 before | Expand all | Expand 10 after
6264 i::Handle<i::Object> token_handle(security_token, isolate); 6264 i::Handle<i::Object> token_handle(security_token, isolate);
6265 return Utils::ToLocal(token_handle); 6265 return Utils::ToLocal(token_handle);
6266 } 6266 }
6267 6267
6268 6268
6269 v8::Isolate* Context::GetIsolate() { 6269 v8::Isolate* Context::GetIsolate() {
6270 i::Handle<i::Context> env = Utils::OpenHandle(this); 6270 i::Handle<i::Context> env = Utils::OpenHandle(this);
6271 return reinterpret_cast<Isolate*>(env->GetIsolate()); 6271 return reinterpret_cast<Isolate*>(env->GetIsolate());
6272 } 6272 }
6273 6273
6274
6275 v8::Local<v8::Object> Context::Global() { 6274 v8::Local<v8::Object> Context::Global() {
6276 i::Handle<i::Context> context = Utils::OpenHandle(this); 6275 i::Handle<i::Context> context = Utils::OpenHandle(this);
6277 i::Isolate* isolate = context->GetIsolate(); 6276 i::Isolate* isolate = context->GetIsolate();
6278 i::Handle<i::Object> global(context->global_proxy(), isolate); 6277 i::Handle<i::Object> global(context->global_proxy(), isolate);
6279 // TODO(dcarney): This should always return the global proxy 6278 // TODO(dcarney): This should always return the global proxy
6280 // but can't presently as calls to GetProtoype will return the wrong result. 6279 // but can't presently as calls to GetProtoype will return the wrong result.
6281 if (i::Handle<i::JSGlobalProxy>::cast( 6280 if (i::Handle<i::JSGlobalProxy>::cast(
6282 global)->IsDetachedFrom(context->global_object())) { 6281 global)->IsDetachedFrom(context->global_object())) {
6283 global = i::Handle<i::Object>(context->global_object(), isolate); 6282 global = i::Handle<i::Object>(context->global_object(), isolate);
6284 } 6283 }
(...skipping 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after
9828 Address callback_address = 9827 Address callback_address =
9829 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9828 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9830 VMState<EXTERNAL> state(isolate); 9829 VMState<EXTERNAL> state(isolate);
9831 ExternalCallbackScope call_scope(isolate, callback_address); 9830 ExternalCallbackScope call_scope(isolate, callback_address);
9832 callback(info); 9831 callback(info);
9833 } 9832 }
9834 9833
9835 9834
9836 } // namespace internal 9835 } // namespace internal
9837 } // namespace v8 9836 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698