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 14 matching lines...) Expand all Loading... |
25 Handle<Name> name, | 25 Handle<Name> name, |
26 AccessorNameGetterCallback getter, | 26 AccessorNameGetterCallback getter, |
27 AccessorNameSetterCallback setter, | 27 AccessorNameSetterCallback setter, |
28 PropertyAttributes attributes) { | 28 PropertyAttributes attributes) { |
29 Factory* factory = isolate->factory(); | 29 Factory* factory = isolate->factory(); |
30 Handle<AccessorInfo> info = factory->NewAccessorInfo(); | 30 Handle<AccessorInfo> info = factory->NewAccessorInfo(); |
31 info->set_property_attributes(attributes); | 31 info->set_property_attributes(attributes); |
32 info->set_all_can_read(false); | 32 info->set_all_can_read(false); |
33 info->set_all_can_write(false); | 33 info->set_all_can_write(false); |
34 info->set_is_special_data_property(true); | 34 info->set_is_special_data_property(true); |
35 info->set_name(*factory->InternalizeName(name)); | 35 name = factory->InternalizeName(name); |
| 36 info->set_name(*name); |
36 Handle<Object> get = v8::FromCData(isolate, getter); | 37 Handle<Object> get = v8::FromCData(isolate, getter); |
37 if (setter == nullptr) setter = &ReconfigureToDataProperty; | 38 if (setter == nullptr) setter = &ReconfigureToDataProperty; |
38 Handle<Object> set = v8::FromCData(isolate, setter); | 39 Handle<Object> set = v8::FromCData(isolate, setter); |
39 info->set_getter(*get); | 40 info->set_getter(*get); |
40 info->set_setter(*set); | 41 info->set_setter(*set); |
41 return info; | 42 return info; |
42 } | 43 } |
43 | 44 |
44 | 45 |
45 static V8_INLINE bool CheckForName(Handle<Name> name, | 46 static V8_INLINE bool CheckForName(Handle<Name> name, |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 Isolate* isolate = name->GetIsolate(); | 1206 Isolate* isolate = name->GetIsolate(); |
1206 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, | 1207 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, |
1207 &ModuleSetExport, attributes); | 1208 &ModuleSetExport, attributes); |
1208 info->set_data(Smi::FromInt(index)); | 1209 info->set_data(Smi::FromInt(index)); |
1209 return info; | 1210 return info; |
1210 } | 1211 } |
1211 | 1212 |
1212 | 1213 |
1213 } // namespace internal | 1214 } // namespace internal |
1214 } // namespace v8 | 1215 } // namespace v8 |
OLD | NEW |