printf( "GetHiddenWindowAndJSContext failed, rv=0x%08X\n", (int)rv );
PRINTF( "GetHiddenWindowAndJSContext failed, rv=0x%08X\n", (int)rv );
nsNativeAppSupportWin::OpenWindow( const char*urlstr, const char *args ) {    nsresult rv;    static NS_DEFINE_CID( kAppShellServiceCID,    NS_APPSHELL_SERVICE_CID );    NS_WITH_SERVICE(nsIAppShellService, appShellService, kAppShellServiceCID, &rv)    if ( NS_SUCCEEDED( rv ) ) {        nsCOMPtr<nsIDOMWindowInternal> hiddenWindow;        JSContext *jsContext;        rv = appShellService->GetHiddenWindowAndJSContext( getter_AddRefs( hiddenWindow ),                                                           &jsContext );        if ( NS_SUCCEEDED( rv ) ) {            void *stackPtr;            jsval *argv = JS_PushArguments( jsContext,                                            &stackPtr,                                            "ssss",                                            urlstr,                                            "_blank",                                            "chrome,dialog=no,all",                                            args );            if( argv ) {                nsCOMPtr<nsIDOMWindowInternal> newWindow;                rv = hiddenWindow->OpenDialog( jsContext,                                               argv,                                               4,                                               getter_AddRefs( newWindow ) );                JS_PopArguments( jsContext, stackPtr );            }        } else {            #ifdef MOZ_DEBUG_DDE            printf( "GetHiddenWindowAndJSContext failed, rv=0x%08X\n", (int)rv );            #endif        }    }    return rv;}