Index: src/accessors.cc |
diff --git a/src/accessors.cc b/src/accessors.cc |
index 74238eb168e832952a608d24f2da66fffcea172d..8f432cd63b1c36fcf8d27dac7161a7500081a65e 100644 |
--- a/src/accessors.cc |
+++ b/src/accessors.cc |
@@ -1110,63 +1110,6 @@ Handle<AccessorInfo> Accessors::BoundFunctionNameInfo( |
attributes); |
} |
-// |
-// Accessors::MakeModuleExport |
-// |
- |
-static void ModuleGetExport(v8::Local<v8::Name> property, |
- const v8::PropertyCallbackInfo<v8::Value>& info) { |
- JSModule* instance = JSModule::cast(*v8::Utils::OpenHandle(*info.Holder())); |
- Context* context = Context::cast(instance->context()); |
- DCHECK(context->IsModuleContext()); |
- Isolate* isolate = instance->GetIsolate(); |
- int slot = info.Data() |
- ->Int32Value(info.GetIsolate()->GetCurrentContext()) |
- .FromMaybe(-1); |
- if (slot < 0 || slot >= context->length()) { |
- Handle<Name> name = v8::Utils::OpenHandle(*property); |
- |
- Handle<Object> exception = isolate->factory()->NewReferenceError( |
- MessageTemplate::kNotDefined, name); |
- isolate->ScheduleThrow(*exception); |
- return; |
- } |
- Object* value = context->get(slot); |
- if (value->IsTheHole(isolate)) { |
- Handle<Name> name = v8::Utils::OpenHandle(*property); |
- |
- Handle<Object> exception = isolate->factory()->NewReferenceError( |
- MessageTemplate::kNotDefined, name); |
- isolate->ScheduleThrow(*exception); |
- return; |
- } |
- info.GetReturnValue().Set(v8::Utils::ToLocal(Handle<Object>(value, isolate))); |
-} |
- |
- |
-static void ModuleSetExport(v8::Local<v8::Name> property, |
- v8::Local<v8::Value> value, |
- const v8::PropertyCallbackInfo<void>& info) { |
- if (!info.ShouldThrowOnError()) return; |
- Handle<Name> name = v8::Utils::OpenHandle(*property); |
- Isolate* isolate = name->GetIsolate(); |
- Handle<Object> exception = |
- isolate->factory()->NewTypeError(MessageTemplate::kNotDefined, name); |
- isolate->ScheduleThrow(*exception); |
-} |
- |
- |
-Handle<AccessorInfo> Accessors::MakeModuleExport( |
- Handle<String> name, |
- int index, |
- PropertyAttributes attributes) { |
- Isolate* isolate = name->GetIsolate(); |
- Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, |
- &ModuleSetExport, attributes); |
- info->set_data(Smi::FromInt(index)); |
- return info; |
-} |
- |
} // namespace internal |
} // namespace v8 |