| Index: src/accessors.cc
|
| diff --git a/src/accessors.cc b/src/accessors.cc
|
| index 052108a9b065feba47aa9ae907d55a9f33d092ab..1f5729ef741aa7b6f08e1ed4d47cb3f686df6353 100644
|
| --- a/src/accessors.cc
|
| +++ b/src/accessors.cc
|
| @@ -1135,8 +1135,20 @@ void Accessors::FunctionNameSetter(
|
| v8::Local<v8::Name> name,
|
| v8::Local<v8::Value> val,
|
| const v8::PropertyCallbackInfo<void>& info) {
|
| - // Function name is non writable, non configurable.
|
| - UNREACHABLE();
|
| + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
|
| + HandleScope scope(isolate);
|
| + Handle<Object> value = Utils::OpenHandle(*val);
|
| +
|
| + if (SetPropertyOnInstanceIfInherited(isolate, info, name, value)) return;
|
| +
|
| + Handle<JSObject> object = Utils::OpenHandle(*info.This());
|
| + LookupIterator it(object, Utils::OpenHandle(*name));
|
| + CHECK_EQ(LookupIterator::ACCESSOR, it.state());
|
| + DCHECK(it.HolderIsReceiverOrHiddenPrototype());
|
| +
|
| + if (Object::SetDataProperty(&it, value).is_null()) {
|
| + isolate->OptionalRescheduleException(false);
|
| + }
|
| }
|
|
|
|
|
|
|