这篇教程C++ throwInvalidAccessError函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中throwInvalidAccessError函数的典型用法代码示例。如果您正苦于以下问题:C++ throwInvalidAccessError函数的具体用法?C++ throwInvalidAccessError怎么用?C++ throwInvalidAccessError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了throwInvalidAccessError函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ASSERT_GC_OBJECT_INHERITSbool JSNPObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot){ JSNPObject* thisObject = JSC::jsCast<JSNPObject*>(object); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); if (!thisObject->m_npObject) { throwInvalidAccessError(exec); return false; } NPIdentifier npIdentifier = npIdentifierFromIdentifier(propertyName); // Calling NPClass::invoke will call into plug-in code, and there's no telling what the plug-in can do. // (including destroying the plug-in). Because of this, we make sure to keep the plug-in alive until // the call has finished. NPRuntimeObjectMap::PluginProtector protector(thisObject->m_objectMap); // First, check if the NPObject has a property with this name. if (thisObject->m_npObject->_class->hasProperty && thisObject->m_npObject->_class->hasProperty(thisObject->m_npObject, npIdentifier)) { slot.setCustom(thisObject, DontDelete, thisObject->propertyGetter); return true; } // Second, check if the NPObject has a method with this name. if (thisObject->m_npObject->_class->hasMethod && thisObject->m_npObject->_class->hasMethod(thisObject->m_npObject, npIdentifier)) { slot.setCustom(thisObject, DontDelete | ReadOnly, thisObject->methodGetter); return true; } return false;}
开发者ID:CannedFish,项目名称:webkitgtk,代码行数:30,
示例2: throwInvalidAccessErrorJSValue RuntimeObject::defaultValue(ExecState* exec, PreferredPrimitiveType hint) const{ if (!m_instance) return throwInvalidAccessError(exec); RefPtr<Instance> instance = m_instance; instance->begin(); JSValue result = instance->defaultValue(exec, hint); instance->end(); return result;}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:12,
示例3: throwInvalidAccessErrorJSValue RuntimeObject::defaultValue(const JSObject* object, ExecState* exec, PreferredPrimitiveType hint){ const RuntimeObject* thisObject = jsCast<const RuntimeObject*>(object); if (!thisObject->m_instance) return throwInvalidAccessError(exec); RefPtr<Instance> instance = thisObject->m_instance; instance->begin(); JSValue result = instance->defaultValue(exec, hint); instance->end(); return result;}
开发者ID:ZeusbaseWeb,项目名称:webkit,代码行数:13,
示例4: throwInvalidAccessErrorbool RuntimeObject::getOwnPropertySlot(JSCell* cell, ExecState *exec, const Identifier& propertyName, PropertySlot& slot){ RuntimeObject* thisObject = static_cast<RuntimeObject*>(cell); if (!thisObject->m_instance) { throwInvalidAccessError(exec); return false; } RefPtr<Instance> instance = thisObject->m_instance; instance->begin(); Class *aClass = instance->getClass(); if (aClass) { // See if the instance has a field with the specified name. Field *aField = aClass->fieldNamed(propertyName, instance.get()); if (aField) { slot.setCustom(thisObject, thisObject->fieldGetter); instance->end(); return true; } else { // Now check if a method with specified name exists, if so return a function object for // that method. MethodList methodList = aClass->methodsNamed(propertyName, instance.get()); if (methodList.size() > 0) { slot.setCustom(thisObject, thisObject->methodGetter); instance->end(); return true; } } // Try a fallback object. if (!aClass->fallbackObject(exec, instance.get(), propertyName).isUndefined()) { slot.setCustom(thisObject, thisObject->fallbackObjectGetter); instance->end(); return true; } } instance->end(); return instance->getOwnPropertySlot(thisObject, exec, propertyName, slot);}
开发者ID:sysrqb,项目名称:chromium-src,代码行数:45,
示例5: fieldGetterEncodedJSValue RuntimeObject::fieldGetter(ExecState* exec, EncodedJSValue thisValue, PropertyName propertyName){ RuntimeObject* thisObj = jsCast<RuntimeObject*>(JSValue::decode(thisValue)); RefPtr<Instance> instance = thisObj->m_instance; if (!instance) return JSValue::encode(throwInvalidAccessError(exec)); instance->begin(); Class *aClass = instance->getClass(); Field* aField = aClass->fieldNamed(propertyName, instance.get()); JSValue result = aField->valueFromInstance(exec, instance.get()); instance->end(); return JSValue::encode(result);}
开发者ID:edcwconan,项目名称:webkit,代码行数:18,
注:本文中的throwInvalidAccessError函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ throwNotEnoughArgumentsError函数代码示例 C++ throwIfNotWorkItemThread函数代码示例 |