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

Side by Side Diff: src/api.cc

Issue 1123703002: Reland "Wrap v8natives.js into a function." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revert stack trace printing Created 5 years, 7 months 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/array.js » ('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 3571 matching lines...) Expand 10 before | Expand all | Expand 10 after
3582 3582
3583 MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context, 3583 MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context,
3584 Local<String> key) { 3584 Local<String> key) {
3585 PREPARE_FOR_EXECUTION(context, "v8::Object::GetOwnPropertyDescriptor()", 3585 PREPARE_FOR_EXECUTION(context, "v8::Object::GetOwnPropertyDescriptor()",
3586 Value); 3586 Value);
3587 auto obj = Utils::OpenHandle(this); 3587 auto obj = Utils::OpenHandle(this);
3588 auto key_name = Utils::OpenHandle(*key); 3588 auto key_name = Utils::OpenHandle(*key);
3589 i::Handle<i::Object> args[] = { obj, key_name }; 3589 i::Handle<i::Object> args[] = { obj, key_name };
3590 i::Handle<i::Object> result; 3590 i::Handle<i::Object> result;
3591 has_pending_exception = 3591 has_pending_exception =
3592 !CallV8HeapFunction(isolate, "ObjectGetOwnPropertyDescriptor", 3592 !CallV8HeapFunction(isolate, "$objectGetOwnPropertyDescriptor",
3593 isolate->factory()->undefined_value(), 3593 isolate->factory()->undefined_value(),
3594 arraysize(args), args).ToHandle(&result); 3594 arraysize(args), args).ToHandle(&result);
3595 RETURN_ON_FAILED_EXECUTION(Value); 3595 RETURN_ON_FAILED_EXECUTION(Value);
3596 RETURN_ESCAPED(Utils::ToLocal(result)); 3596 RETURN_ESCAPED(Utils::ToLocal(result));
3597 } 3597 }
3598 3598
3599 3599
3600 Local<Value> v8::Object::GetOwnPropertyDescriptor(Local<String> key) { 3600 Local<Value> v8::Object::GetOwnPropertyDescriptor(Local<String> key) {
3601 auto context = ContextFromHeapObject(Utils::OpenHandle(this)); 3601 auto context = ContextFromHeapObject(Utils::OpenHandle(this));
3602 RETURN_TO_LOCAL_UNCHECKED(GetOwnPropertyDescriptor(context, key), Value); 3602 RETURN_TO_LOCAL_UNCHECKED(GetOwnPropertyDescriptor(context, key), Value);
(...skipping 4428 matching lines...) Expand 10 before | Expand all | Expand 10 after
8031 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8031 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8032 Address callback_address = 8032 Address callback_address =
8033 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8033 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8034 VMState<EXTERNAL> state(isolate); 8034 VMState<EXTERNAL> state(isolate);
8035 ExternalCallbackScope call_scope(isolate, callback_address); 8035 ExternalCallbackScope call_scope(isolate, callback_address);
8036 callback(info); 8036 callback(info);
8037 } 8037 }
8038 8038
8039 8039
8040 } } // namespace v8::internal 8040 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698