| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 } | 873 } |
| 874 context->set(slot, *v8::Utils::OpenHandle(*value)); | 874 context->set(slot, *v8::Utils::OpenHandle(*value)); |
| 875 } | 875 } |
| 876 | 876 |
| 877 | 877 |
| 878 Handle<AccessorInfo> Accessors::MakeModuleExport( | 878 Handle<AccessorInfo> Accessors::MakeModuleExport( |
| 879 Handle<String> name, | 879 Handle<String> name, |
| 880 int index, | 880 int index, |
| 881 PropertyAttributes attributes) { | 881 PropertyAttributes attributes) { |
| 882 Factory* factory = name->GetIsolate()->factory(); | 882 Factory* factory = name->GetIsolate()->factory(); |
| 883 Handle<AccessorInfo> info = factory->NewAccessorInfo(); | 883 Handle<ExecutableAccessorInfo> info = factory->NewExecutableAccessorInfo(); |
| 884 info->set_property_attributes(attributes); | 884 info->set_property_attributes(attributes); |
| 885 info->set_all_can_read(true); | 885 info->set_all_can_read(true); |
| 886 info->set_all_can_write(true); | 886 info->set_all_can_write(true); |
| 887 info->set_name(*name); | 887 info->set_name(*name); |
| 888 info->set_data(Smi::FromInt(index)); | 888 info->set_data(Smi::FromInt(index)); |
| 889 Handle<Object> getter = v8::FromCData(&ModuleGetExport); | 889 Handle<Object> getter = v8::FromCData(&ModuleGetExport); |
| 890 Handle<Object> setter = v8::FromCData(&ModuleSetExport); | 890 Handle<Object> setter = v8::FromCData(&ModuleSetExport); |
| 891 info->set_getter(*getter); | 891 info->set_getter(*getter); |
| 892 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 892 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
| 893 return info; | 893 return info; |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 } } // namespace v8::internal | 897 } } // namespace v8::internal |
| OLD | NEW |