void npObjectQueryProperty(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info) { NPIdentifier identifier = getStringIdentifier(name); if (npObjectGetProperty(info.Holder(), identifier, name, info.GetIsolate()).IsEmpty()) return; v8SetReturnValueInt(info, 0); }
static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::toImpl(holder); v8SetReturnValueInt(info, impl->conditionalLongAttribute()); }
static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) { TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetterException", "TestTypedefs", info.Holder(), info.GetIsolate()); int jsValue = imp->attrWithGetterException(exceptionState); if (UNLIKELY(exceptionState.throwIfNeeded())) return; v8SetReturnValueInt(info, jsValue); }
static void namedPropertyQuery(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Integer>& info) { const CString& nameInUtf8 = name.utf8(); ExceptionState exceptionState(info.GetIsolate(), ExceptionState::GetterContext, "TestSpecialOperations", nameInUtf8.data()); TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder()); bool result = impl->namedPropertyQuery(name, exceptionState); if (!result) return; v8SetReturnValueInt(info, v8::None); }
static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info) { TestInterface* collection = V8TestInterface::toNative(info.Holder()); AtomicString propertyName = toCoreAtomicString(name); ExceptionState exceptionState(info.Holder(), info.GetIsolate()); bool result = collection->namedPropertyQuery(propertyName, exceptionState); if (exceptionState.throwIfNeeded()) return; if (!result) return; v8SetReturnValueInt(info, v8::None); }
static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info) { TestSpecialOperations* impl = V8TestSpecialOperations::toNative(info.Holder()); AtomicString propertyName = toCoreAtomicString(name); v8::String::Utf8Value namedProperty(name); ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestSpecialOperations", info.Holder(), info.GetIsolate()); bool result = impl->namedPropertyQuery(propertyName, exceptionState); if (exceptionState.throwIfNeeded()) return; if (!result) return; v8SetReturnValueInt(info, v8::None); }
static void doNotExposeJSAccessorAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerived::toImpl(holder); v8SetReturnValueInt(info, impl->doNotExposeJSAccessorAttribute()); }
static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) { TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); v8SetReturnValueInt(info, imp->attrWithSetterException()); }
static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) { v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyLongAttribute()); }
static void supplementalStaticReadOnlyAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) { v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAttr()); }
static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) { v8::Handle<v8::Object> holder = info.Holder(); TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder); v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute()); }
static void lengthAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); TestIntegerIndexed* impl = V8TestIntegerIndexed::toImpl(holder); v8SetReturnValueInt(info, impl->length()); }
static void staticConditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8SetReturnValueInt(info, TestInterfaceOriginTrialEnabled::staticConditionalReadOnlyLongAttribute()); }