本文整理汇总了C++中NS_LossyConvertUTF16toASCII函数的典型用法代码示例。如果您正苦于以下问题:C++ NS_LossyConvertUTF16toASCII函数的具体用法?C++ NS_LossyConvertUTF16toASCII怎么用?C++ NS_LossyConvertUTF16toASCII使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NS_LossyConvertUTF16toASCII函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: printf
NS_IMETHODIMP
nsSVGGenericContainerFrame::AttributeChanged(PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType)
{
#ifdef DEBUG
nsAutoString str;
aAttribute->ToString(str);
printf("** nsSVGGenericContainerFrame::AttributeChanged(%s)\n",
NS_LossyConvertUTF16toASCII(str).get());
#endif
return NS_OK;
}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:14,代码来源:nsSVGGenericContainerFrame.cpp
示例2: printf
already_AddRefed<gfxOS2Font>
gfxOS2Platform::FindFontForChar(uint32_t aCh, gfxOS2Font *aFont)
{
#ifdef DEBUG_thebes
printf("gfxOS2Platform::FindFontForChar(%d, ...)\n", aCh);
#endif
// is codepoint with no matching font? return null immediately
if (mCodepointsWithNoFonts.test(aCh)) {
return nullptr;
}
// the following is not very clever but it's a quick fix to search all fonts
// (one should instead cache the charmaps as done on Mac and Win)
// just continue to append all fonts known to the system
nsTArray<nsString> fontList;
nsAutoCString generic;
nsresult rv = GetFontList(aFont->GetStyle()->language, generic, fontList);
if (NS_SUCCEEDED(rv)) {
// start at 3 to skip over the generic entries
for (uint32_t i = 3; i < fontList.Length(); i++) {
#ifdef DEBUG_thebes
printf("searching in entry i=%d (%s)\n",
i, NS_LossyConvertUTF16toASCII(fontList[i]).get());
#endif
nsRefPtr<gfxOS2Font> font =
gfxOS2Font::GetOrMakeFont(fontList[i], aFont->GetStyle());
if (!font)
continue;
FT_Face face = cairo_ft_scaled_font_lock_face(font->CairoScaledFont());
if (!face || !face->charmap) {
if (face)
cairo_ft_scaled_font_unlock_face(font->CairoScaledFont());
continue;
}
FT_UInt gid = FT_Get_Char_Index(face, aCh); // find the glyph id
if (gid != 0) {
// this is the font
cairo_ft_scaled_font_unlock_face(font->CairoScaledFont());
return font.forget();
}
}
}
// no match found, so add to the set of non-matching codepoints
mCodepointsWithNoFonts.set(aCh);
return nullptr;
}
开发者ID:dryeo,项目名称:Pale-Moon,代码行数:50,代码来源:gfxOS2Platform.cpp
示例3: fprintf
void
nsXMLCDATASection::List(FILE* out, PRInt32 aIndent) const
{
PRInt32 index;
for (index = aIndent; --index >= 0; ) fputs(" ", out);
fprintf(out, "CDATASection refcount=%d<", mRefCnt.get());
nsAutoString tmp;
ToCString(tmp, 0, mText.GetLength());
fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out);
fputs(">\n", out);
}
开发者ID:lofter2011,项目名称:Icefox,代码行数:14,代码来源:nsXMLCDATASection.cpp
示例4: switch
void
RDFContentSinkImpl::ParseText(nsIRDFNode **aResult)
{
// XXXwaterson wasteful, but we'd need to make a copy anyway to be
// able to call nsIRDFService::Get[Resource|Literal|...]().
nsAutoString value;
value.Append(mText, mTextLength);
value.Trim(" \t\n\r");
switch (mParseMode) {
case eRDFContentSinkParseMode_Literal:
{
nsIRDFLiteral *result;
gRDFService->GetLiteral(value.get(), &result);
*aResult = result;
}
break;
case eRDFContentSinkParseMode_Resource:
{
nsIRDFResource *result;
gRDFService->GetUnicodeResource(value, &result);
*aResult = result;
}
break;
case eRDFContentSinkParseMode_Int:
{
PRInt32 i, err;
i = value.ToInteger(&err);
nsIRDFInt *result;
gRDFService->GetIntLiteral(i, &result);
*aResult = result;
}
break;
case eRDFContentSinkParseMode_Date:
{
PRTime t = rdf_ParseDate(nsDependentCString(NS_LossyConvertUTF16toASCII(value).get(), value.Length()));
nsIRDFDate *result;
gRDFService->GetDateLiteral(t, &result);
*aResult = result;
}
break;
default:
NS_NOTREACHED("unknown parse type");
break;
}
}
开发者ID:MozillaOnline,项目名称:gecko-dev,代码行数:50,代码来源:nsRDFContentSink.cpp
示例5: LOG
NS_IMETHODIMP
sbWatchFolderService::OnFileSystemChanged(const nsAString & aFilePath)
{
LOG(("sbWatchFolderService::OnFileSystemChanged %s",
NS_LossyConvertUTF16toASCII(aFilePath).get()));
bool isIgnoredPath = PR_FALSE;
nsresult rv = DecrementIgnoredPathCount(aFilePath, &isIgnoredPath);
NS_ENSURE_SUCCESS(rv, rv);
// Don't bother with this change if it is currently being ignored.
if (isIgnoredPath) {
return NS_OK;
}
nsString filePath(aFilePath);
// The watcher will report all changes from the previous session before the
// watcher has started. Don't set the timer until then.
if (mHasWatcherStarted) {
// See if the changed path set already has this path inside of it.
sbStringSetIter foundIter = mChangedPaths.find(filePath);
if (foundIter != mChangedPaths.end()) {
// If this path is currently in the changed path vector already,
// delay processing this path until a later time.
mDelayedChangedPaths.insert(filePath);
// Start the delayed timer if it isn't running already.
if (!mChangeDelayTimerIsSet) {
rv = mChangeDelayTimer->InitWithCallback(this,
CHANGE_DELAY_TIMER_DELAY,
nsITimer::TYPE_ONE_SHOT);
NS_ENSURE_SUCCESS(rv, rv);
mChangeDelayTimerIsSet = PR_TRUE;
}
}
else {
mChangedPaths.insert(filePath);
rv = SetEventPumpTimer();
NS_ENSURE_SUCCESS(rv, rv);
}
}
else {
mChangedPaths.insert(filePath);
}
return NS_OK;
}
开发者ID:Brijen,项目名称:nightingale-hacking,代码行数:49,代码来源:sbWatchFolderService.cpp
示例6: NS_ENSURE_ARG_POINTER
NS_IMETHODIMP nsAbLDAPCard::SetMetaProperties(nsILDAPMessage *aMessage)
{
NS_ENSURE_ARG_POINTER(aMessage);
// Get DN
nsAutoCString dn;
nsresult rv = aMessage->GetDn(dn);
NS_ENSURE_SUCCESS(rv, rv);
SetDn(dn);
// Get the list of set attributes
CharPtrArrayGuard attrs;
rv = aMessage->GetAttributes(attrs.GetSizeAddr(), attrs.GetArrayAddr());
NS_ENSURE_SUCCESS(rv, rv);
nsAutoCString attr;
m_attributes.Clear();
for (uint32_t i = 0; i < attrs.GetSize(); ++i)
{
attr.Assign(nsDependentCString(attrs[i]));
ToLowerCase(attr);
m_attributes.AppendElement(attr);
}
// Get the objectClass values
m_objectClass.Clear();
PRUnicharPtrArrayGuard vals;
rv = aMessage->GetValues("objectClass", vals.GetSizeAddr(),
vals.GetArrayAddr());
// objectClass is not always included in search result entries and
// nsILDAPMessage::GetValues returns NS_ERROR_LDAP_DECODING_ERROR if the
// requested attribute doesn't exist.
if (rv == NS_ERROR_LDAP_DECODING_ERROR)
return NS_OK;
NS_ENSURE_SUCCESS(rv, rv);
nsAutoCString oclass;
for (uint32_t i = 0; i < vals.GetSize(); ++i)
{
oclass.Assign(NS_LossyConvertUTF16toASCII(nsDependentString(vals[i])));
ToLowerCase(oclass);
m_objectClass.AppendElement(oclass);
}
return NS_OK;
}
开发者ID:hsinyi,项目名称:releases-comm-central,代码行数:49,代码来源:nsAbLDAPCard.cpp
示例7: fprintf
void
nsXMLProcessingInstruction::List(FILE* out, PRInt32 aIndent) const
{
PRInt32 index;
for (index = aIndent; --index >= 0; ) fputs(" ", out);
fprintf(out, "Processing instruction refcount=%d<", mRefCnt.get());
nsAutoString tmp;
ToCString(tmp, 0, mText.GetLength());
tmp.Insert(nsDependentAtomString(NodeInfo()->GetExtraName()).get(), 0);
fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out);
fputs(">\n", out);
}
开发者ID:ehsan,项目名称:mozilla-history,代码行数:15,代码来源:nsXMLProcessingInstruction.cpp
示例8: fputs
nsresult
nsContentDLF::CreateDocument(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
const nsCID& aDocumentCID,
nsIStreamListener** aDocListener,
nsIContentViewer** aContentViewer)
{
NS_TIME_FUNCTION;
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIURI> aURL;
rv = aChannel->GetURI(getter_AddRefs(aURL));
if (NS_FAILED(rv)) return rv;
#ifdef NOISY_CREATE_DOC
if (nullptr != aURL) {
nsAutoString tmp;
aURL->ToString(tmp);
fputs(NS_LossyConvertUTF16toASCII(tmp).get(), stdout);
printf(": creating document\n");
}
#endif
// Create the document
nsCOMPtr<nsIDocument> doc = do_CreateInstance(aDocumentCID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// Create the content viewer XXX: could reuse content viewer here!
nsCOMPtr<nsIContentViewer> contentViewer;
rv = NS_NewContentViewer(getter_AddRefs(contentViewer));
NS_ENSURE_SUCCESS(rv, rv);
doc->SetContainer(aContainer);
// Initialize the document to begin loading the data. An
// nsIStreamListener connected to the parser is returned in
// aDocListener.
rv = doc->StartDocumentLoad(aCommand, aChannel, aLoadGroup, aContainer, aDocListener, true);
NS_ENSURE_SUCCESS(rv, rv);
// Bind the document to the Content Viewer
rv = contentViewer->LoadStart(doc);
contentViewer.forget(aContentViewer);
return rv;
}
开发者ID:houzhenggang,项目名称:ExMail,代码行数:48,代码来源:nsContentDLF.cpp
示例9: do_GetService
nsresult nsTestUConv::DisplayDetectors()
{
const char * trace = "DisplayDetectors";
mLog.AddTrace(trace);
nsresult res = NS_OK;
nsCOMPtr<nsICharsetConverterManager> ccMan =
do_GetService(kCharsetConverterManagerCID, &res);
if (NS_FAILED(res)) {
mLog.PrintError("NS_WITH_SERVICE", res);
return res;
}
// charset detectors
nsCOMPtr<nsIUTF8StringEnumerator> detectors;
res = ccMan->GetCharsetDetectorList(getter_AddRefs(detectors));
if (NS_FAILED(res)) {
mLog.PrintError("GetCharsetDetectorList()", res);
return res;
}
printf("***** Character Set Detectors *****\n");
bool hasMore;
detectors->HasMore(&hasMore);
while (hasMore) {
nsAutoCString detectorName;
res = detectors->GetNext(detectorName);
if (NS_FAILED(res)) {
mLog.PrintError("GetNext()", res);
return res;
}
printf("%s", detectorName.get());
PrintSpaces(36 - detectorName.Length()); // align to hard coded column number
nsAutoString title;
res = ccMan->GetCharsetTitle(detectorName.get(), title);
if (NS_FAILED(res)) title.SetLength(0);
printf("\"%s\"\n", NS_LossyConvertUTF16toASCII(title).get());
detectors->HasMore(&hasMore);
}
mLog.DelTrace(trace);
return NS_OK;
}
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:48,代码来源:TestUConv.cpp
示例10: MOZ_ASSERT
void
GeckoMediaPluginServiceParent::RemoveOnGMPThread(const nsAString& aDirectory,
const bool aDeleteFromDisk,
const bool aCanDefer)
{
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
LOGD(("%s::%s: %s", __CLASS__, __FUNCTION__, NS_LossyConvertUTF16toASCII(aDirectory).get()));
nsCOMPtr<nsIFile> directory;
nsresult rv = NS_NewLocalFile(aDirectory, false, getter_AddRefs(directory));
if (NS_WARN_IF(NS_FAILED(rv))) {
return;
}
MutexAutoLock lock(mMutex);
for (size_t i = mPlugins.Length() - 1; i < mPlugins.Length(); i--) {
nsCOMPtr<nsIFile> pluginpath = mPlugins[i]->GetDirectory();
bool equals;
if (NS_FAILED(directory->Equals(pluginpath, &equals)) || !equals) {
continue;
}
nsRefPtr<GMPParent> gmp = mPlugins[i];
if (aDeleteFromDisk && gmp->State() != GMPStateNotLoaded) {
// We have to wait for the child process to release its lib handle
// before we can delete the GMP.
gmp->MarkForDeletion();
if (!mPluginsWaitingForDeletion.Contains(aDirectory)) {
mPluginsWaitingForDeletion.AppendElement(aDirectory);
}
}
if (gmp->State() == GMPStateNotLoaded || !aCanDefer) {
// GMP not in use or shutdown is being forced; can shut it down now.
gmp->AbortAsyncShutdown();
gmp->CloseActive(true);
mPlugins.RemoveElementAt(i);
}
}
if (aDeleteFromDisk) {
if (NS_SUCCEEDED(directory->Remove(true))) {
mPluginsWaitingForDeletion.RemoveElement(aDirectory);
}
}
}
开发者ID:moosilauke18,项目名称:gecko-dev,代码行数:47,代码来源:GMPServiceParent.cpp
示例11: fputs
NS_IMETHODIMP
nsCSSMediaRule::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 indent = aIndent; --indent >= 0; ) fputs(" ", out);
nsAutoString buffer;
fputs("@media ", out);
if (mMedia) {
nsAutoString mediaText;
mMedia->GetText(mediaText);
fputs(NS_LossyConvertUTF16toASCII(mediaText).get(), out);
}
return nsCSSGroupRule::List(out, aIndent);
}
开发者ID:ahadzi,项目名称:celtx,代码行数:17,代码来源:nsCSSRules.cpp
示例12: SQLAllocHandle
nsresult
mozSqlConnectionODBC::RealExec(const nsAString& aQuery,
mozISqlResult** aResult, PRInt32* aAffectedRows)
{
if (!mConnection)
return NS_ERROR_NOT_INITIALIZED;
SQLHSTMT hstmt;
SQLAllocHandle(SQL_HANDLE_STMT, mConnection, &hstmt);
if(!SQL_SUCCEEDED(SQLExecDirect(hstmt, (SQLCHAR*) NS_LossyConvertUTF16toASCII(aQuery).get(), SQL_NTS))){
SetError(hstmt, SQL_HANDLE_STMT);
return NS_ERROR_FAILURE;
}
if (!aResult){
if (!aAffectedRows)
return NS_ERROR_NULL_POINTER;
SQLINTEGER count;
SQLRowCount(hstmt, &count);
*aAffectedRows = (PRInt32) count;
return NS_OK;
}
mozSqlResult *mozresult = new mozSqlResultODBC(this, aQuery);
if (!mozresult){
SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
return NS_ERROR_OUT_OF_MEMORY;
}
((mozSqlResultODBC*)mozresult)->SetResult(hstmt);
nsresult rv = mozresult->Init();
if (NS_FAILED(rv)){
delete mozresult;
return rv;
}
*aResult = mozresult;
NS_ADDREF(*aResult);
return NS_OK;
}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:45,代码来源:mozSqlConnectionODBC.cpp
示例13: LoadLibraryForEGLOnWindows
// see the comment in GLLibraryEGL::EnsureInitialized() for the rationale here.
static PRLibrary*
LoadLibraryForEGLOnWindows(const nsAString& filename)
{
nsCOMPtr<nsIFile> file;
nsresult rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(file));
if (NS_FAILED(rv))
return nullptr;
file->Append(filename);
PRLibrary* lib = nullptr;
rv = file->Load(&lib);
if (NS_FAILED(rv)) {
nsPrintfCString msg("Failed to load %s - Expect EGL initialization to fail",
NS_LossyConvertUTF16toASCII(filename).get());
NS_WARNING(msg.get());
}
return lib;
}
开发者ID:hoosteeno,项目名称:gecko-dev,代码行数:19,代码来源:GLLibraryEGL.cpp
示例14: PR_LOG
nsresult
txStylesheetCompilerState::loadIncludedStylesheet(const nsAString& aURI)
{
PR_LOG(txLog::xslt, PR_LOG_ALWAYS,
("CompilerState::loadIncludedStylesheet: %s\n",
NS_LossyConvertUTF16toASCII(aURI).get()));
if (mStylesheetURI.Equals(aURI)) {
return NS_ERROR_XSLT_LOAD_RECURSION;
}
NS_ENSURE_TRUE(mObserver, NS_ERROR_NOT_IMPLEMENTED);
nsAutoPtr<txToplevelItem> item(new txDummyItem);
NS_ENSURE_TRUE(item, NS_ERROR_OUT_OF_MEMORY);
nsresult rv = mToplevelIterator.addBefore(item);
NS_ENSURE_SUCCESS(rv, rv);
item.forget();
// step back to the dummy-item
mToplevelIterator.previous();
txACompileObserver* observer = static_cast<txStylesheetCompiler*>(this);
nsRefPtr<txStylesheetCompiler> compiler =
new txStylesheetCompiler(aURI, mStylesheet, &mToplevelIterator,
observer);
NS_ENSURE_TRUE(compiler, NS_ERROR_OUT_OF_MEMORY);
// step forward before calling the observer in case of syncronous loading
mToplevelIterator.next();
if (mChildCompilerList.AppendElement(compiler) == nsnull) {
return NS_ERROR_OUT_OF_MEMORY;
}
rv = mObserver->loadURI(aURI, mStylesheetURI, compiler);
if (NS_FAILED(rv)) {
mChildCompilerList.RemoveElement(compiler);
}
return rv;
}
开发者ID:harthur,项目名称:mozilla-central,代码行数:43,代码来源:txStylesheetCompiler.cpp
示例15:
NS_IMETHODIMP
nsMacLocale::GetPlatformLocale(const nsAString& locale, short* scriptCode, short* langCode, short* regionCode)
{
char country_code[3];
char lang_code[3];
char region_code[3];
bool validCountryFound;
int i;
if (!ParseLocaleString(NS_LossyConvertUTF16toASCII(locale).get(), lang_code, country_code, region_code, '-')) {
*scriptCode = smRoman;
*langCode = langEnglish;
*regionCode = verUS;
return NS_ERROR_FAILURE;
}
if (country_code[0]!=0)
{
validCountryFound=false;
for(i=0;country_list[i].iso_code;i++) {
if (strcmp(country_list[i].iso_code,country_code)==0) {
*regionCode = country_list[i].mac_region_code;
validCountryFound=true;
break;
}
}
if (!validCountryFound) {
*scriptCode = smRoman;
*langCode = langEnglish;
*regionCode = verUS;
return NS_ERROR_FAILURE;
}
}
for(i=0;lang_list[i].iso_code;i++) {
if (strcmp(lang_list[i].iso_code, lang_code)==0) {
*scriptCode = lang_list[i].mac_script_code;
*langCode = lang_list[i].mac_lang_code;
return NS_OK;
}
}
return NS_ERROR_FAILURE;
}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:43,代码来源:nsMacLocale.cpp
示例16: LOG
NS_IMETHODIMP
sbRemoteCommands::RemoveCommand( const nsAString &aID )
{
LOG(("sbRemoteCommands::RemoveCommand()"));
PRUint32 num = mCommands.Length();
for ( PRUint32 index = 0; index < num; index++ ) {
LOG(( "sbRemoteCommands::RemoveCommand(%d:%s)",
index,
NS_LossyConvertUTF16toASCII(mCommands.ElementAt(index).id).get()));
if ( mCommands.ElementAt(index).id == aID ) {
mCommands.RemoveElementAt(index);
DoCommandsUpdated();
return NS_OK;
}
}
// XXXredfive check an error code here and log a warning if the command
// isn't found
return NS_OK;
}
开发者ID:AntoineTurmel,项目名称:nightingale-hacking,代码行数:19,代码来源:sbRemoteCommands.cpp
示例17: ListFloats
static void
ListFloats(FILE* out, PRInt32 aIndent, const nsFloatCacheList& aFloats)
{
nsFloatCache* fc = aFloats.Head();
while (fc) {
nsFrame::IndentBy(out, aIndent);
nsIFrame* frame = fc->mFloat;
fprintf(out, "[email protected]%p ", static_cast<void*>(frame));
if (frame) {
nsAutoString frameName;
frame->GetFrameName(frameName);
fputs(NS_LossyConvertUTF16toASCII(frameName).get(), out);
}
else {
fputs("\n###!!! NULL out-of-flow frame", out);
}
fprintf(out, "\n");
fc = fc->Next();
}
}
开发者ID:FunkyVerb,项目名称:devtools-window,代码行数:20,代码来源:nsLineBox.cpp
示例18: fputs
FILE* operator<<(FILE* out, const nsRect& rect)
{
nsAutoString tmp;
// Output the coordinates in fractional pixels so they're easier to read
tmp.Append('{');
tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.x,
nsDeviceContext::AppUnitsPerCSSPixel()));
tmp.AppendLiteral(", ");
tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.y,
nsDeviceContext::AppUnitsPerCSSPixel()));
tmp.AppendLiteral(", ");
tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.width,
nsDeviceContext::AppUnitsPerCSSPixel()));
tmp.AppendLiteral(", ");
tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.height,
nsDeviceContext::AppUnitsPerCSSPixel()));
tmp.Append('}');
fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out);
return out;
}
开发者ID:MekliCZ,项目名称:positron,代码行数:21,代码来源:nsRect.cpp
示例19: NS_ASSERTION
const txXPathNode*
txExecutionState::retrieveDocument(const nsAString& aUri)
{
NS_ASSERTION(aUri.FindChar(PRUnichar('#')) == kNotFound,
"Remove the fragment.");
if (mDisableLoads) {
return nsnull;
}
PR_LOG(txLog::xslt, PR_LOG_DEBUG,
("Retrieve Document %s", NS_LossyConvertUTF16toASCII(aUri).get()));
// try to get already loaded document
txLoadedDocumentEntry *entry = mLoadedDocuments.PutEntry(aUri);
if (!entry) {
return nsnull;
}
if (!entry->mDocument) {
// open URI
nsAutoString errMsg;
// XXX we should get the loader from the actual node
// triggering the load, but this will do for the time being
nsresult rv;
rv = txParseDocumentFromURI(aUri, *mLoadedDocuments.mSourceDocument,
errMsg,
getter_Transfers(entry->mDocument));
if (NS_FAILED(rv) || !entry->mDocument) {
mLoadedDocuments.RawRemoveEntry(entry);
receiveError(NS_LITERAL_STRING("Couldn't load document '") +
aUri + NS_LITERAL_STRING("': ") + errMsg, rv);
return nsnull;
}
}
return entry->mDocument;
}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:40,代码来源:txExecutionState.cpp
示例20: MOZ_ASSERT
nsresult
GMPParent::Init(GeckoMediaPluginService *aService, nsIFile* aPluginDir)
{
MOZ_ASSERT(aPluginDir);
MOZ_ASSERT(aService);
MOZ_ASSERT(GMPThread() == NS_GetCurrentThread());
mService = aService;
mDirectory = aPluginDir;
nsAutoString leafname;
nsresult rv = aPluginDir->GetLeafName(leafname);
if (NS_FAILED(rv)) {
return rv;
}
LOGD(("%s::%s: %p for %s", __CLASS__, __FUNCTION__, this,
NS_LossyConvertUTF16toASCII(leafname).get()));
MOZ_ASSERT(leafname.Length() > 4);
mName = Substring(leafname, 4);
return ReadGMPMetaData();
}
开发者ID:chenhequn,项目名称:gecko,代码行数:23,代码来源:GMPParent.cpp
注:本文中的NS_LossyConvertUTF16toASCII函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论