| OLD | NEW |
| 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/accessors.h" | 5 #include "src/accessors.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/execution.h" | 10 #include "src/execution.h" |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 } | 989 } |
| 990 | 990 |
| 991 | 991 |
| 992 MUST_USE_RESULT static MaybeHandle<Object> ReplaceAccessorWithDataProperty( | 992 MUST_USE_RESULT static MaybeHandle<Object> ReplaceAccessorWithDataProperty( |
| 993 Isolate* isolate, Handle<JSObject> object, Handle<Name> name, | 993 Isolate* isolate, Handle<JSObject> object, Handle<Name> name, |
| 994 Handle<Object> value, bool is_observed, Handle<Object> old_value) { | 994 Handle<Object> value, bool is_observed, Handle<Object> old_value) { |
| 995 LookupIterator it(object, name); | 995 LookupIterator it(object, name); |
| 996 CHECK_EQ(LookupIterator::ACCESSOR, it.state()); | 996 CHECK_EQ(LookupIterator::ACCESSOR, it.state()); |
| 997 DCHECK(it.HolderIsReceiverOrHiddenPrototype()); | 997 DCHECK(it.HolderIsReceiverOrHiddenPrototype()); |
| 998 it.ReconfigureDataProperty(value, it.property_details().attributes()); | 998 it.ReconfigureDataProperty(value, it.property_details().attributes()); |
| 999 it.WriteDataValue(value); | |
| 1000 | 999 |
| 1001 if (is_observed && !old_value->SameValue(*value)) { | 1000 if (is_observed && !old_value->SameValue(*value)) { |
| 1002 return JSObject::EnqueueChangeRecord(object, "update", name, old_value); | 1001 return JSObject::EnqueueChangeRecord(object, "update", name, old_value); |
| 1003 } | 1002 } |
| 1004 | 1003 |
| 1005 return value; | 1004 return value; |
| 1006 } | 1005 } |
| 1007 | 1006 |
| 1008 | 1007 |
| 1009 MUST_USE_RESULT static MaybeHandle<Object> SetFunctionLength( | 1008 MUST_USE_RESULT static MaybeHandle<Object> SetFunctionLength( |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1489 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 1488 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
| 1490 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 1489 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
| 1491 info->set_getter(*getter); | 1490 info->set_getter(*getter); |
| 1492 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 1491 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
| 1493 return info; | 1492 return info; |
| 1494 } | 1493 } |
| 1495 | 1494 |
| 1496 | 1495 |
| 1497 } // namespace internal | 1496 } // namespace internal |
| 1498 } // namespace v8 | 1497 } // namespace v8 |
| OLD | NEW |