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

Side by Side Diff: src/api.cc

Issue 1173283004: Restore ExecutableAccessorInfoHandling for now (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/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 3517 matching lines...) Expand 10 before | Expand all | Expand 10 after
3528 } 3528 }
3529 3529
3530 i::LookupIterator it(self, key_obj, i::LookupIterator::OWN_SKIP_INTERCEPTOR); 3530 i::LookupIterator it(self, key_obj, i::LookupIterator::OWN_SKIP_INTERCEPTOR);
3531 if (it.IsFound() && it.state() == i::LookupIterator::ACCESS_CHECK) { 3531 if (it.IsFound() && it.state() == i::LookupIterator::ACCESS_CHECK) {
3532 DCHECK(isolate->MayAccess(self)); 3532 DCHECK(isolate->MayAccess(self));
3533 it.Next(); 3533 it.Next();
3534 } 3534 }
3535 3535
3536 if (it.IsFound() && !it.IsConfigurable()) return Just(false); 3536 if (it.IsFound() && !it.IsConfigurable()) return Just(false);
3537 3537
3538 has_pending_exception = i::Runtime::DefineObjectProperty( 3538 has_pending_exception =
3539 self, key_obj, value_obj, NONE).is_null(); 3539 i::Runtime::DefineObjectProperty(self, key_obj, value_obj, NONE,
3540 i::JSObject::DONT_FORCE_FIELD).is_null();
3540 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); 3541 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
3541 return Just(true); 3542 return Just(true);
3542 } 3543 }
3543 3544
3544 3545
3545 Maybe<bool> v8::Object::CreateDataProperty(v8::Local<v8::Context> context, 3546 Maybe<bool> v8::Object::CreateDataProperty(v8::Local<v8::Context> context,
3546 uint32_t index, 3547 uint32_t index,
3547 v8::Local<Value> value) { 3548 v8::Local<Value> value) {
3548 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::CreateDataProperty()", 3549 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::CreateDataProperty()",
3549 bool); 3550 bool);
(...skipping 16 matching lines...) Expand all
3566 value, v8::None); 3567 value, v8::None);
3567 } 3568 }
3568 } 3569 }
3569 3570
3570 Maybe<PropertyAttributes> attributes = 3571 Maybe<PropertyAttributes> attributes =
3571 i::JSReceiver::GetOwnElementAttributes(self, index); 3572 i::JSReceiver::GetOwnElementAttributes(self, index);
3572 if (attributes.IsJust() && attributes.FromJust() & DONT_DELETE) { 3573 if (attributes.IsJust() && attributes.FromJust() & DONT_DELETE) {
3573 return Just(false); 3574 return Just(false);
3574 } 3575 }
3575 3576
3576 has_pending_exception = i::Runtime::DefineObjectProperty( 3577 has_pending_exception =
3577 self, isolate->factory()->Uint32ToString(index), 3578 i::Runtime::DefineObjectProperty(
3578 value_obj, NONE).is_null(); 3579 self, isolate->factory()->Uint32ToString(index), value_obj, NONE,
3580 i::JSObject::DONT_FORCE_FIELD).is_null();
Igor Sheludko 2015/06/11 20:10:01 Probably you should pass DEFAULT_HANDLING here.
3579 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); 3581 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
3580 return Just(true); 3582 return Just(true);
3581 } 3583 }
3582 3584
3583 3585
3584 Maybe<bool> v8::Object::DefineOwnProperty(v8::Local<v8::Context> context, 3586 Maybe<bool> v8::Object::DefineOwnProperty(v8::Local<v8::Context> context,
3585 v8::Local<Name> key, 3587 v8::Local<Name> key,
3586 v8::Local<Value> value, 3588 v8::Local<Value> value,
3587 v8::PropertyAttribute attributes) { 3589 v8::PropertyAttribute attributes) {
3588 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::DefineOwnProperty()", 3590 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::DefineOwnProperty()",
(...skipping 4828 matching lines...) Expand 10 before | Expand all | Expand 10 after
8417 Address callback_address = 8419 Address callback_address =
8418 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8420 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8419 VMState<EXTERNAL> state(isolate); 8421 VMState<EXTERNAL> state(isolate);
8420 ExternalCallbackScope call_scope(isolate, callback_address); 8422 ExternalCallbackScope call_scope(isolate, callback_address);
8421 callback(info); 8423 callback(info);
8422 } 8424 }
8423 8425
8424 8426
8425 } // namespace internal 8427 } // namespace internal
8426 } // namespace v8 8428 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698