зеркало из https://github.com/mozilla/gecko-dev.git
Camino only - Bug 373335: Move console logging to a method in JSConsole. r/sr=pink
This commit is contained in:
Родитель
3e802a732e
Коммит
40b8e88094
|
@ -47,7 +47,7 @@ class nsConsoleListener;
|
|||
}
|
||||
|
||||
+ (JSConsole*)sharedJSConsole;
|
||||
|
||||
- (void)logMessage:(NSString*)message;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -77,7 +77,7 @@ NS_IMETHODIMP nsConsoleListener::Observe(nsIConsoleMessage* aMessage)
|
|||
if (aMessage) {
|
||||
nsXPIDLString msgString;
|
||||
aMessage->GetMessage(getter_Copies(msgString));
|
||||
NSLog(@"JS error: %@", [NSString stringWith_nsAString:msgString]);
|
||||
[[JSConsole sharedJSConsole] logMessage:[NSString stringWith_nsAString:msgString]];
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -129,6 +129,11 @@ static JSConsole* gJSConsole;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)logMessage:(NSString*)message
|
||||
{
|
||||
NSLog(@"JS error: %@", message);
|
||||
}
|
||||
|
||||
// gets called before XPCOM shutdown
|
||||
- (void)cleanupConsoleService
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче