static void namedPropertyQuery(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Integer>& info) { const CString& nameInUtf8 = name.utf8(); ExceptionState exceptionState(info.GetIsolate(), ExceptionState::GetterContext, "TestInterface2", nameInUtf8.data()); TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); bool result = impl->namedPropertyQuery(name, exceptionState); if (!result) return; v8SetReturnValueInt(info, v8::None); }
static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info) { if (!name->IsString()) return; TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); v8::String::Utf8Value namedProperty(name); ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface2", info.Holder(), info.GetIsolate()); bool result = impl->namedPropertyQuery(propertyName, exceptionState); if (exceptionState.throwIfNeeded()) return; if (!result) return; v8SetReturnValueInt(info, v8::None); }