当前位置: 首页>>代码示例>>C++>>正文


C++ Persistent::ReadOnlyPrototype方法代码示例

本文整理汇总了C++中v8::Persistent::ReadOnlyPrototype方法的典型用法代码示例。如果您正苦于以下问题:C++ Persistent::ReadOnlyPrototype方法的具体用法?C++ Persistent::ReadOnlyPrototype怎么用?C++ Persistent::ReadOnlyPrototype使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在v8::Persistent的用法示例。


在下文中一共展示了Persistent::ReadOnlyPrototype方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ENABLE

static v8::Persistent<v8::FunctionTemplate> ConfigureV8ClipboardTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "Clipboard", v8::Persistent<v8::FunctionTemplate>(), V8Clipboard::internalFieldCount,
        V8ClipboardAttrs, WTF_ARRAY_LENGTH(V8ClipboardAttrs),
        V8ClipboardCallbacks, WTF_ARRAY_LENGTH(V8ClipboardCallbacks));
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.
    

#if ENABLE(DATA_TRANSFER_ITEMS)
    if (RuntimeEnabledFeatures::dataTransferItemsEnabled()) {
        static const V8DOMConfiguration::BatchedAttribute attrData =\
        // Attribute 'items' (Type: 'readonly attribute' ExtAttr: 'V8EnabledAtRuntime Conditional')
        {"items", ClipboardV8Internal::itemsAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
        V8DOMConfiguration::configureAttribute(instance, proto, attrData);
    }

#endif // ENABLE(DATA_TRANSFER_ITEMS)

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:29,代码来源:V8Clipboard.cpp

示例2: configureTemplate

static v8::Persistent<v8::FunctionTemplate> ConfigureV8WorkerNavigatorTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "WorkerNavigator", v8::Persistent<v8::FunctionTemplate>(), V8WorkerNavigator::internalFieldCount,
        WorkerNavigatorAttrs, WTF_ARRAY_LENGTH(WorkerNavigatorAttrs),
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例3:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNamedConstructorTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNamedConstructor", v8::Persistent<v8::FunctionTemplate>(), V8TestNamedConstructor::internalFieldCount,
        0, 0,
        0, 0, isolate, currentWorldType);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例4: configureTemplate

static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestSerializedScriptValueInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "TestSerializedScriptValueInterface", v8::Persistent<v8::FunctionTemplate>(), V8TestSerializedScriptValueInterface::internalFieldCount,
        0, 0,
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:14,代码来源:V8TestSerializedScriptValueInterface.cpp

示例5:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8SVGFontElementTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "SVGFontElement", V8SVGElement::GetTemplate(), V8SVGFontElement::internalFieldCount,
                       0, 0,
                       0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.


    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:15,代码来源:V8SVGFontElement.cpp

示例6: configureTemplate

static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNodeTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = configureTemplate(desc, "TestNode", V8Node::GetTemplate(), V8TestNode::internalFieldCount,
        0, 0,
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    desc->SetCallHandler(V8TestNode::constructorCallback);
    

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
开发者ID:dzhshf,项目名称:WebKit,代码行数:16,代码来源:V8TestNode.cpp

示例7:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8SpeechRecognitionErrorTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "SpeechRecognitionError", V8Event::GetTemplate(), V8SpeechRecognitionError::internalFieldCount,
        V8SpeechRecognitionErrorAttrs, WTF_ARRAY_LENGTH(V8SpeechRecognitionErrorAttrs),
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    desc->SetCallHandler(V8SpeechRecognitionError::constructorCallback);
    

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:16,代码来源:V8SpeechRecognitionError.cpp

示例8:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8DOMStringMapTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "DOMStringMap", v8::Persistent<v8::FunctionTemplate>(), V8DOMStringMap::internalFieldCount,
        0, 0,
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    
    desc->InstanceTemplate()->SetNamedPropertyHandler(V8DOMStringMap::namedPropertyGetter, V8DOMStringMap::namedPropertySetter, V8DOMStringMap::namedPropertyQuery, V8DOMStringMap::namedPropertyDeleter, V8DOMStringMap::namedPropertyEnumerator);

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:16,代码来源:V8DOMStringMap.cpp

示例9:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8InjectedScriptHostTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "InjectedScriptHost", v8::Persistent<v8::FunctionTemplate>(), V8InjectedScriptHost::internalFieldCount,
        0, 0,
        V8InjectedScriptHostCallbacks, WTF_ARRAY_LENGTH(V8InjectedScriptHostCallbacks));
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.
    

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:19,代码来源:V8InjectedScriptHost.cpp

示例10: configureTemplate

static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestMediaQueryListListenerTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = configureTemplate(desc, "TestMediaQueryListListener", v8::Persistent<v8::FunctionTemplate>(), V8TestMediaQueryListListener::internalFieldCount,
        0, 0,
        TestMediaQueryListListenerCallbacks, WTF_ARRAY_LENGTH(TestMediaQueryListListenerCallbacks));
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.
    

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
开发者ID:Moondee,项目名称:Artemis,代码行数:19,代码来源:V8TestMediaQueryListListener.cpp

示例11:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestSerializedScriptValueInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestSerializedScriptValueInterface", v8::Persistent<v8::FunctionTemplate>(), V8TestSerializedScriptValueInterface::internalFieldCount,
        V8TestSerializedScriptValueInterfaceAttrs, WTF_ARRAY_LENGTH(V8TestSerializedScriptValueInterfaceAttrs),
        V8TestSerializedScriptValueInterfaceMethods, WTF_ARRAY_LENGTH(V8TestSerializedScriptValueInterfaceMethods), isolate);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    desc->SetCallHandler(V8TestSerializedScriptValueInterface::constructorCallback);
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.
    

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:jbat100,项目名称:webkit,代码行数:20,代码来源:V8TestSerializedScriptValueInterface.cpp

示例12: getToStringTemplate

static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestSerializedScriptValueInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestSerializedScriptValueInterface", v8::Persistent<v8::FunctionTemplate>(), V8TestSerializedScriptValueInterface::internalFieldCount,
        TestSerializedScriptValueInterfaceAttrs, WTF_ARRAY_LENGTH(TestSerializedScriptValueInterfaceAttrs),
        TestSerializedScriptValueInterfaceCallbacks, WTF_ARRAY_LENGTH(TestSerializedScriptValueInterfaceCallbacks));
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    desc->SetCallHandler(V8TestSerializedScriptValueInterface::constructorCallback);
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.
    

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
开发者ID:,项目名称:,代码行数:20,代码来源:

示例13:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8SVGPreserveAspectRatioTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "SVGPreserveAspectRatio", v8::Persistent<v8::FunctionTemplate>(), V8SVGPreserveAspectRatio::internalFieldCount,
        V8SVGPreserveAspectRatioAttrs, WTF_ARRAY_LENGTH(V8SVGPreserveAspectRatioAttrs),
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.
    
    V8DOMConfiguration::batchConfigureConstants(desc, proto, V8SVGPreserveAspectRatioConsts, WTF_ARRAY_LENGTH(V8SVGPreserveAspectRatioConsts));

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:20,代码来源:V8SVGPreserveAspectRatio.cpp

示例14:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8HTMLAnchorElementTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "HTMLAnchorElement", V8HTMLElement::GetTemplate(), V8HTMLAnchorElement::internalFieldCount,
                       V8HTMLAnchorElementAttrs, WTF_ARRAY_LENGTH(V8HTMLAnchorElementAttrs),
                       0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.

    proto->Set(v8::String::NewSymbol("toString"), v8::FunctionTemplate::New(HTMLAnchorElementV8Internal::toStringCallback, v8Undefined(), defaultSignature), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum));

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:20,代码来源:V8HTMLAnchorElement.cpp

示例15:

static v8::Persistent<v8::FunctionTemplate> ConfigureV8MediaKeyErrorTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature;
    if (!RuntimeEnabledFeatures::encryptedMediaEnabled())
        defaultSignature = V8DOMConfiguration::configureTemplate(desc, "", v8::Persistent<v8::FunctionTemplate>(), V8MediaKeyError::internalFieldCount, 0, 0, 0, 0);
    else
    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "MediaKeyError", v8::Persistent<v8::FunctionTemplate>(), V8MediaKeyError::internalFieldCount,
        V8MediaKeyErrorAttrs, WTF_ARRAY_LENGTH(V8MediaKeyErrorAttrs),
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    UNUSED_PARAM(instance); // In some cases, it will not be used.
    UNUSED_PARAM(proto); // In some cases, it will not be used.
    
    V8DOMConfiguration::batchConfigureConstants(desc, proto, V8MediaKeyErrorConsts, WTF_ARRAY_LENGTH(V8MediaKeyErrorConsts));

    // Custom toString template
    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
    return desc;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:23,代码来源:V8MediaKeyError.cpp


注:本文中的v8::Persistent::ReadOnlyPrototype方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。