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

Side by Side Diff: src/api.cc

Issue 2103033002: Version 5.2.361.27 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.2
Patch Set: Created 4 years, 5 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 | « include/v8-version.h ('k') | src/objects.h » ('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 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after
4114 Local<Name> key) { 4114 Local<Name> key) {
4115 PREPARE_FOR_EXECUTION_PRIMITIVE(context, Object, HasOwnProperty, bool); 4115 PREPARE_FOR_EXECUTION_PRIMITIVE(context, Object, HasOwnProperty, bool);
4116 auto self = Utils::OpenHandle(this); 4116 auto self = Utils::OpenHandle(this);
4117 auto key_val = Utils::OpenHandle(*key); 4117 auto key_val = Utils::OpenHandle(*key);
4118 auto result = i::JSReceiver::HasOwnProperty(self, key_val); 4118 auto result = i::JSReceiver::HasOwnProperty(self, key_val);
4119 has_pending_exception = result.IsNothing(); 4119 has_pending_exception = result.IsNothing();
4120 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); 4120 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
4121 return result; 4121 return result;
4122 } 4122 }
4123 4123
4124 Maybe<bool> v8::Object::HasOwnProperty(Local<Context> context, uint32_t index) {
4125 PREPARE_FOR_EXECUTION_PRIMITIVE(context, Object, HasOwnProperty, bool);
4126 auto self = Utils::OpenHandle(this);
4127 auto result = i::JSReceiver::HasOwnProperty(self, index);
4128 has_pending_exception = result.IsNothing();
4129 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
4130 return result;
4131 }
4124 4132
4125 bool v8::Object::HasOwnProperty(Local<String> key) { 4133 bool v8::Object::HasOwnProperty(Local<String> key) {
4126 auto context = ContextFromHeapObject(Utils::OpenHandle(this)); 4134 auto context = ContextFromHeapObject(Utils::OpenHandle(this));
4127 return HasOwnProperty(context, key).FromMaybe(false); 4135 return HasOwnProperty(context, key).FromMaybe(false);
4128 } 4136 }
4129 4137
4130 4138
4131 Maybe<bool> v8::Object::HasRealNamedProperty(Local<Context> context, 4139 Maybe<bool> v8::Object::HasRealNamedProperty(Local<Context> context,
4132 Local<Name> key) { 4140 Local<Name> key) {
4133 PREPARE_FOR_EXECUTION_PRIMITIVE(context, Object, HasRealNamedProperty, bool); 4141 PREPARE_FOR_EXECUTION_PRIMITIVE(context, Object, HasRealNamedProperty, bool);
(...skipping 4664 matching lines...) Expand 10 before | Expand all | Expand 10 after
8798 Address callback_address = 8806 Address callback_address =
8799 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8807 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8800 VMState<EXTERNAL> state(isolate); 8808 VMState<EXTERNAL> state(isolate);
8801 ExternalCallbackScope call_scope(isolate, callback_address); 8809 ExternalCallbackScope call_scope(isolate, callback_address);
8802 callback(info); 8810 callback(info);
8803 } 8811 }
8804 8812
8805 8813
8806 } // namespace internal 8814 } // namespace internal
8807 } // namespace v8 8815 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698