Bug 12406
Summary: | addMessageToConsole should work without a Page | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Enhancement | CC: | ahmad.saleem792, aroben, bfulgham, inspector-bugzilla-changes, rniwa |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Alexey Proskuryakov
In many cases, error messages may not get logged, because there is no frame or page to call addMessageToConsole() on, e.g.:
void SVGDocumentExtensions::reportWarning(const String& message)
{
if (Page* page = m_doc->frame()->page())
page->chrome()->addMessageToConsole("Warning: " + message, m_doc->tokenizer() ? m_doc->tokenizer()->lineNumber() : 1, String());
}
It would be good to find a way not to lose these messages.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
This line is changed now:
https://github.com/WebKit/WebKit/blob/0393f2f7c7a1e97a7a4c63441b50703cc11d493f/Source/WebCore/svg/SVGDocumentExtensions.cpp#L134
ap@webkit.org - is it something still need to be fixed?
Alexey Proskuryakov
I'm not sure. But if it hasn't been done in 15 years, keeping this bug open won't get it done.