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

Side by Side Diff: src/api.cc

Issue 1643563002: [runtime] further dismantle AccessorInfoHandling, reducing it to the single API usecase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 3539 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 MUST_USE_RESULT 3550 MUST_USE_RESULT
3551 static i::MaybeHandle<i::Object> DefineObjectProperty( 3551 static i::MaybeHandle<i::Object> DefineObjectProperty(
3552 i::Handle<i::JSObject> js_object, i::Handle<i::Object> key, 3552 i::Handle<i::JSObject> js_object, i::Handle<i::Object> key,
3553 i::Handle<i::Object> value, i::PropertyAttributes attrs) { 3553 i::Handle<i::Object> value, i::PropertyAttributes attrs) {
3554 i::Isolate* isolate = js_object->GetIsolate(); 3554 i::Isolate* isolate = js_object->GetIsolate();
3555 bool success = false; 3555 bool success = false;
3556 i::LookupIterator it = i::LookupIterator::PropertyOrElement( 3556 i::LookupIterator it = i::LookupIterator::PropertyOrElement(
3557 isolate, js_object, key, &success, i::LookupIterator::OWN); 3557 isolate, js_object, key, &success, i::LookupIterator::OWN);
3558 if (!success) return i::MaybeHandle<i::Object>(); 3558 if (!success) return i::MaybeHandle<i::Object>();
3559 3559
3560 return i::JSObject::DefineOwnPropertyIgnoreAttributes(&it, value, attrs); 3560 return i::JSObject::DefineOwnPropertyIgnoreAttributes(
3561 &it, value, attrs, i::JSObject::FORCE_FIELD);
3561 } 3562 }
3562 3563
3563 3564
3564 Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context> context, 3565 Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context> context,
3565 v8::Local<Value> key, v8::Local<Value> value, 3566 v8::Local<Value> key, v8::Local<Value> value,
3566 v8::PropertyAttribute attribs) { 3567 v8::PropertyAttribute attribs) {
3567 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::ForceSet()", bool); 3568 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::ForceSet()", bool);
3568 auto self = i::Handle<i::JSObject>::cast(Utils::OpenHandle(this)); 3569 auto self = i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
3569 auto key_obj = Utils::OpenHandle(*key); 3570 auto key_obj = Utils::OpenHandle(*key);
3570 auto value_obj = Utils::OpenHandle(*value); 3571 auto value_obj = Utils::OpenHandle(*value);
(...skipping 4982 matching lines...) Expand 10 before | Expand all | Expand 10 after
8553 Address callback_address = 8554 Address callback_address =
8554 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8555 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8555 VMState<EXTERNAL> state(isolate); 8556 VMState<EXTERNAL> state(isolate);
8556 ExternalCallbackScope call_scope(isolate, callback_address); 8557 ExternalCallbackScope call_scope(isolate, callback_address);
8557 callback(info); 8558 callback(info);
8558 } 8559 }
8559 8560
8560 8561
8561 } // namespace internal 8562 } // namespace internal
8562 } // namespace v8 8563 } // 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