Closed
Bug 34665
Opened 25 years ago
Closed 7 years ago
Lots of printfs in webclient code.
Categories
(Core Graveyard :: Java APIs to WebShell, enhancement, P3)
Core Graveyard
Java APIs to WebShell
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: edburns, Assigned: edburns)
References
Details
Attachments
(2 files)
1.07 KB,
text/plain
|
Details | |
24.08 KB,
patch
|
Details | Diff | Splinter Review |
This has become a problem now that I'm trying to embed webclient in staroffice,
which doesn't preserve its console, so there's no stdout/stderr.
I'm converting the native code to use PR_LOG.
Checkin comments.
This change replaces all printfs in src_moz with calls to PR_LOG. No
printfs should appear in src_moz anymore.
You won't see any console output from native code unless you define
NSPR_LOG_MODULES=webclient:3
in your environment. Furthermore, if you want PR_LOG statements in
webclient to go to a file instead, define
WEBCLIENT_LOG_FILE=C:\VALIDDIR\filename.txt
in your environment. This file will get created fresh each time, since
PR_LOG uses fopen(filename, "w").
New Files:
I've created ns_globals.h, included from jni_util.h. ns_globals.h holds
an extern * to a struct used in the PR_LOG calls.
Significant changes:
WrapperFactoryImpl.cpp
nativeAppInitialize(){
Added:
#if DEBUG_RAPTOR_CANVAS
prLogModuleInfo = PR_NewLogModule("webclient");
const char *webclientLogFile = PR_GetEnv("WEBCLIENT_LOG_FILE");
if (nsnull != webclientLogFile) {
PR_SetLogFile(webclientLogFile);
// If this fails, it just goes to stdout/stderr
}
#endif
}
All the other files in this checkin follow the this pattern:
Before checkin:
printf("InitMozillaStuff(%lx): Create the Event Queue for the UI
thread...\n",
initContext);
After checkin:
if (prLogModuleInfo) {
PR_LOG(prLogModuleInfo, 3,
("InitMozillaStuff(%lx): Create the Event Queue for the UI
thread...\n",
initContext));
}
See http://lxr.mozilla.org/mozilla/source/nsprpub/pr/include/prlog.h#190
for the definition of PR_LOG
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 5•24 years ago
|
||
Now webclient code still contain too many printf's code.
For example:
file /java/webclient/src_moz/CBrowserContainer.cpp
line 605:
if (aStateFlags & STATE_REDIRECTING) {
printf("debug: edburns: STATE_REDIRECTING\n");
}
if (aStateFlags & STATE_TRANSFERRING) {
printf("debug: edburns: STATE_TRANSFERRING\n");
}
if (aStateFlags & STATE_NEGOTIATING) {
printf("debug: edburns: STATE_NEGOTIATING\n");
}
file /java/webclient/src_moz/NativeEventThread.cpp
line 535:
printf("debug: edburns: argv[1]: %s argv[2]: %s\n", argv[1],
argv[2]);
Following lines is a output of webclient:
=========================================================================
debug: edburns: argv[1]: -p argv[2]: sva
ProfileName : sva
Creating Event Queue
InitMozillaStuff(91b5cc0): Create the action queue
Init the baseWindow
Create the BaseWindow...
WEBSHELL+ = 1
nsPluginHostImpl ctor
Searching for plugins at: c:\mozilla\mozilla\dist\Win32_d.obj\bin\plugins
Searching for plugins at: C:\Program Files\Netscape\Communicator\Program\Plugins
For application/x-java-vm found plugin
c:\mozilla\mozilla\dist\Win32_d.obj\bin\plugins\NPOJI600.dll
Creation Done.....
Show the webBrowser
in BrowserControlCanvas setBounds: x = 4 y = 65 w = 632 h = 365
native library does implement webclient.Navigation
native library does implement webclient.CurrentPage
native library does implement webclient.History
native library does implement webclient.Preferences
prefChanged: network.cookie.warnAboutCookies closure: This IS the Closure!
native library does implement webclient.EventRegistration
native library does implement webclient.Bookmarks
debug: edburns: got Bookmarks instance
Start reading in bookmarks.html
Finished reading in bookmarks.html (80000 microseconds)
+++++++++++++++++++++ Thread Id ---- 091B5AB0
debug: edburns: Currently Viewing:
http://www.mozilla.org/projects/blackwood/webclient/
Disabling Quirk StyleSheet
Enabling Quirk StyleSheet
Note: verifyreflow is disabled
debug: edburns: STATE_TRANSFERRING
Note: styleverifytree is disabled
Note: frameverifytree is disabled
Opening file cookperm.txt failed
in BrowserControlCanvas setBounds: x = 4 y = 65 w = 632 h = 358
=========================================================================
This bug should be reopen.
Alexey, please change QA contact to youself.
Comment 6•24 years ago
|
||
Agree. A lot of printf's are still exist in Webclient code.
Status: RESOLVED → REOPENED
QA Contact: geetha.vaidyanaathan → avm
Resolution: FIXED → ---
Updated•13 years ago
|
Product: Core → Core Graveyard
Comment 7•7 years ago
|
||
Java APIs to WebShell isn't a thing anymore. Closing.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•