Re: simple nsIWebProgressListener question

2004-07-15 Thread yueweng
> However, why not just use:
> NS_IMPL_ISUPPORTS4(nsSampleImpl, nsIWebProgressListener,
> nsISupportsWeakReference, nsIObserver, nsISample)
> 
> (if you do that, you have to remove NS_IMPL_ADDREF and NS_IMPL_RELEASE)
> 
> 
> --
Hi Christian,

Thanks for your quick response.

After implementing NS_IMPL_ISUPPORTS4(nsSampleImpl,
nsIWebProgressListener,
 nsISupportsWeakReference, nsIObserver, nsISample), things seem to be
better.

However, now, my program crashed at the macro
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSampleImpl) ==
nsSampleImplConstructor().  nsSampleImplConstructor() functionis is
listed under nsModule ComponentInfo components[].  The exact point
that crashed inside nsSampleImplConstructor() is inst->AddRef().

inst seems to carry invalid information:

-   inst0x009dbe90
+   nsIWebProgressListener  {...}
-   nsSupportsWeakReference {...}
-   nsISupportsWeakReference{...}
-   nsISupports {...}
-   __vfptr 0xfeeefeee
[0] CXX0030: Error: expression cannot be evaluated
[1] CXX0030: Error: expression cannot be evaluated
[2] CXX0030: Error: expression cannot be evaluated
+   mProxy  0xfeeefeee
+   nsIObserver {...}
-   nsISample   {...}
-   nsISupports {...}
-   __vfptr 0xfeeefeee
[0] CXX0030: Error: expression cannot be evaluated
[1] CXX0030: Error: expression cannot be evaluated
[2] CXX0030: Error: expression cannot be evaluated
+   mRefCnt {...}
+   _mOwningThread  {...}
+   mValue  0xfeeefeee ""

The callstack is as follows:

nsSampleImplConstructor() line 99
nsGenericFactory::CreateInstance() line 82 + 21 bytes
nsComponentManagerImpl::CreateInstanceByContractID() line 2000 + 24
bytes
nsComponentManagerImpl::GetServiceByContractID() line 2420 + 50 bytes
nsGetServiceByContractID::operator()() line 121 + 38 bytes
nsCOMPtr_base::assign_from_helper() line 114 + 18 bytes
nsCOMPtr::nsCOMPtr() line 846
NS_CreateServicesFromCategory() line 785 + 37 bytes
NS_InitXPCOM2() line 633 + 17 bytes
NS_InitXPCOM2() line 173 + 18 bytes
GRE_Startup() line 477 + 35 bytes
main() line 1705 + 5 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e814c7()

I realised that nsSampleImpl and ~nsSampleImpl are called once before
the crashed occurs:

nsSampleImpl() enter.
~nsSampleImpl() enter
~nsSampleImpl() exit.
nsSampleImpl() exit.
---
crashed occurs
---

I am wonder if you know what's went wrong, please help me if you got
any idea.

Thanks,
YueWeng
___
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding


Asian Teen Bondage 8059

2004-07-15 Thread dbrown
14 year old asian girl getting tied up and fucked by 4 men

http://www.theparadise.x-y.net/AsianTeenBondage.zip
yjlpgoxysqlmmvmnylqlhuzbnbsytmyu

___
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding


Asian Teen Bondage 4329

2004-07-15 Thread dbrown
14 year old asian girl getting tied up and fucked by 4 men

http://www.theparadise.x-y.net/AsianTeenBondage.zip
lsplrvdmqpxeuxdm

___
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding


How to use default window creator?

2004-07-15 Thread Anton Bar
Hi all!
How can I make my embedded browser to use default window creator for 
prompts, alerts and new browser windows?

Currently my chrome doesn't implement nsIWindowCreator, but the embedded 
browser still doesn't open no alerts neither new windows.

Any info will be very appreciated!
TIA,
Anton.
___
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding


Re: simple nsIWebProgressListener question

2004-07-15 Thread yueweng
Christian Biesinger <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On Wed, Jul 14, 2004 at 03:02:24AM -0700, yueweng wrote:
> > I have implement the suggestion in the following code, but, I am still
> > not able to capture any browser signal yet.  May I know if there is
> > anything I missed out in the following code in order to start
> > receiving Mozilla browser event?
> 
> It seems that you never make sure that your component gets called at any
> time. See for example
> http://www.mozilla.org/projects/xpcom/book/cxc/html/weblock.html#1001977
> for how to make sure that your component gets instantiated on each app
> startup.
> 
> --
Hi Christian ,

Thanks for the help again.  I have made changes by inherit one more
interface from nsIObserver.  Then program is able to perform
nsSampleRegistrationProc() to do AddCategoryEntry("xpcom-startup",
similar to what weblock has done.

Then I restart the mozilla again.  This time my constructor
nsSampleImpl() is being called, I think it should be, during starting
of mozilla.  However, mozilla crashed inside the constructor,
nsSampleImpl() at the function AddProgressListener().  I don't know
what's wrong with my implementation, I am wondering if you can help me
up again?

/
The implementation of nsSampleImpl() is as follows:

static NS_DEFINE_IID(kDocLoaderServiceCID,
NS_DOCUMENTLOADER_SERVICE_CID);

nsSampleImpl::nsSampleImpl()
{
nsCOMPtr
progress(do_GetService(kDocLoaderServiceCID));
if (progress)
progress->AddProgressListener((nsIWebProgressListener*)this,   

  nsIWebProgress::NOTIFY_STATE_DOCUMENT);
}

//
The following is the callstack when crashed:

nsQueryInterface::operator()() line 47 + 21 bytes
nsCOMPtr::assign_from_qi() line 1030 + 17 bytes
nsCOMPtr::nsCOMPtr() line 572
nsCOMPtr::Assert_NoQueryNeeded() line 520
nsCOMPtr::nsCOMPtr() line 590
nsDocLoaderImpl::AddProgressListener() line 891 <-MY PROGRAM
nsSampleImpl::nsSampleImpl() line 79 <-MY PROGRAM 
nsSampleImplConstructor() line 89 + 27 bytes <-MY PROGRAM
nsGenericFactory::CreateInstance() line 82 + 21 bytes 
nsComponentManagerImpl::CreateInstanceByContractID() line 2000 + 24
bytes
nsComponentManagerImpl::GetServiceByContractID() line 2420 + 50 bytes
nsGetServiceByContractID::operator()() line 121 + 38 bytes
nsCOMPtr_base::assign_from_helper() line 114 + 18 bytes
nsCOMPtr::nsCOMPtr() line 846
NS_CreateServicesFromCategory() line 785 + 37 bytes
NS_InitXPCOM2() line 633 + 17 bytes
NS_InitXPCOM2() line 173 + 18 bytes
GRE_Startup() line 477 + 35 bytes
main() line 1705 + 5 bytes
mainCRTStartup() line 338 + 17 bytes

//
The implementation of other parts of the program is as follows:

NS_IMETHODIMP
nsSampleImpl::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
  if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
  }
  *aInstancePtr = NULL;
  if (aIID.Equals(NS_GET_IID(nsISample))) {
*aInstancePtr = (void*) NS_STATIC_CAST(nsISample*,this);
NS_ADDREF_THIS();
return NS_OK;
  }
  if (aIID.Equals(NS_GET_IID(nsSupportsWeakReference))) {
*aInstancePtr = (void*) NS_STATIC_CAST(nsISample*,this);
NS_ADDREF_THIS();
return NS_OK;
  }
  if (aIID.Equals(NS_GET_IID(nsIObserver))) {
*aInstancePtr = (void*) NS_STATIC_CAST(nsISample*,this);
NS_ADDREF_THIS();
return NS_OK;
  }
  if (aIID.Equals(NS_GET_IID(nsIWebProgressListener))) {
*aInstancePtr = (void*) NS_STATIC_CAST(nsISample*,this);
NS_ADDREF_THIS();
return NS_OK;
  }
  if (aIID.Equals(NS_GET_IID(nsISupports))) {
*aInstancePtr = (void*) NS_STATIC_CAST(nsISupports*,
  
NS_STATIC_CAST(nsISample*,this));
NS_ADDREF_THIS();
return NS_OK;
  }
  return NS_NOINTERFACE;
}

NS_IMPL_ADDREF(nsSampleImpl)
NS_IMPL_RELEASE(nsSampleImpl)

#define NS_SAMPLE_CONTRACTID "@mozilla.org/sample;1"

class nsSampleImpl : public nsIWebProgressListener,
 public nsSupportsWeakReference,
 public nsIObserver,
 public nsISample
{
public:
nsSampleImpl();

NS_DECL_ISUPPORTS;
NS_DECL_NSISAMPLE
NS_DECL_NSIOBSERVER;
NS_DECL_NSIWEBPROGRESSLISTENER;

private:
~nsSampleImpl();
char* mValue;
};

static NS_METHOD nsSampleRegistrationProc(nsIComponentManager
*aCompMgr,
  nsIFile *aPath,
  const char
*registryLocation,
  const char *componentType,
  const nsModuleComponentInfo
*info)
{
nsresult rv;

nsCOMPtr servman =
do_QueryInterface((nsISupports*)aCompMgr, &rv);

if (NS_FAILED(rv))
 return rv;

nsCOMPtr catman;