本文整理汇总了C++中PassRefPtrWillBeRawPtr::frame方法的典型用法代码示例。如果您正苦于以下问题:C++ PassRefPtrWillBeRawPtr::frame方法的具体用法?C++ PassRefPtrWillBeRawPtr::frame怎么用?C++ PassRefPtrWillBeRawPtr::frame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PassRefPtrWillBeRawPtr
的用法示例。
在下文中一共展示了PassRefPtrWillBeRawPtr::frame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ASSERT
v8::Handle<v8::Object> V8TestInterfaceDocument::createWrapper(PassRefPtrWillBeRawPtr<TestInterfaceDocument> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl);
ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceDocument>(impl.get(), isolate));
if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get())->typeInfo();
// Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
// the same object de-ref functions, though, so use that as the basis of the check.
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
}
if (LocalFrame* frame = impl->frame()) {
if (frame->script().initializeMainWorld()) {
// initializeMainWorld may have created a wrapper for the object, retry from the start.
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapper<V8TestInterfaceDocument>(impl.get(), isolate);
if (!wrapper.IsEmpty())
return wrapper;
}
}
v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
if (UNLIKELY(wrapper.IsEmpty()))
return wrapper;
installPerContextEnabledProperties(wrapper, impl.get(), isolate);
V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceDocument>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
return wrapper;
}
开发者ID:PDi-Communication-Systems-Inc,项目名称:lollipop_external_chromium_org,代码行数:27,代码来源:V8TestInterfaceDocument.cpp