Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6822799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:42:23+00:00 2026-05-26T21:42:23+00:00

I have made some modifications to nsMediaStream.h/cpp in the Mozilla (6.0.2) code and one

  • 0

I have made some modifications to nsMediaStream.h/cpp in the Mozilla (6.0.2) code and one of them requires that I get the ASCII string from the nsIURI class used by the Mozilla framework for representing and parsing URIs. Seems easy enough, one might think. The Mozilla documentation (https://developer.mozilla.org/en/nsIURI) tells me that I can use the attribute asciiSpec to obtain such a string. The documentation for nsACString is horribly confusing, but that’s another matter.

Where things go south is that when I try to use the nsIURI variable mURI of nsMediaStream using

mURI->asciiSpec

I get the following error from the MSVC compiler:

[..]/content/media/nsMediaStream.cpp(146) :
 error C2039: 'asciiSpec' : is not a member of 'nsIURI'
        [..]\obj-i686-pc-mingw32\dist\include\nsIURI.h(83) : see declaration of 'nsIURI'

When I look at the referenced nsIURI.h file, which is generated from an interface IDL file, I see the following: http://google-web-toolkit.googlecode.com/svn/plugin-sdks/gecko-sdks/gecko-1.9.0/include/nsIURI.h

As far as I can tell said header file has no relevance at all to nsIURI as used in the Mozilla code and seems more of an interface/prototype than an actual class. None of the attributes and methods listed in the documentation are present. MSVC seems to agree with me on this.

I feel like I’m missing something big here, but even after spending months in the Mozilla source and surviving the build system I can’t seem to figure this one out, nor can anyone else I have asked so far. Any clues would be more than appreciated 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:42:24+00:00Added an answer on May 26, 2026 at 9:42 pm

    When using XPCOM from C++ there are no properties – all interface properties are transformed into getter/setter methods. The interface definition files (IDL files) are compiled into regular C++ header files using xpidl tool – so the file you found is the correct one but it is generated automatically. You would get asciiSpec property like this:

    nsCString spec;
    nsresult rv = mURI->GetAsciiSpec(spec);
    if (NS_FAILED(rv))
      ...  // handle error
    else
      ...  // do something with spec variable
    

    There is no SetAsciiSpec method because this property is read-only.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made some changes in one perforce client, but haven't submitted them. I
I have made some code which exports some details of a journal article to
I have already asked some questions about this topic, I have made some modifications
I have an asp.net application that requires some editing of the machine.config file in
I have made some progress with the DataList and UserControl this morning but I
I have made some screenshots of my website, and in internet explorer 6 my
I have made some screenshots of my website, and in internet explorer 6 my
I have a ASP.net 2.0 app and I have made some changes the the
i have made columns in some of the tables encrypted in sql server 2008.
I have made a user control in asp.net c#. Becuase of some data I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.