[Webkit-unassigned] [Bug 26083] New: How to access formatted Java script Console message ?

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 29 11:33:12 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26083

           Summary: How to access formatted Java script Console message ?
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: gop.rag at gmail.com


On Thu, May 14, 2009 at 11:48 AM, Gopal Raghavan <gop.rag at gmail.com> wrote:

    WebKit/WebCore/page/Cosole.cpp provides Console::log(), debug(), error()
etc., to support Firebug console API.
    There are two overloaded addMessage(). Console::log messages are processed
through Console::addMessage(MessageLevel level, ScriptCallStack* callStack,
bool acceptNoArguments)


    I am trying to access this message through the chromeClient.

    Any idea why only the first argument is passed to  client ?


    // in Console::addMessage
        if (getFirstArgumentAsString(callStack->state(), lastCaller, message))
            page->chrome()->client()->addMessageToConsole(message,
lastCaller.lineNumber(), lastCaller.sourceURL().prettyURL());


    Immediately, as next step the entire message is provided to inspector.

    When inspector processes the ConsoleMessage, it uses the formatter in
front-end/console.js to display it on Inspector console.

    Is there a way to access this formatted message ?

    Thanks,
    --
    Gopal


On Thu, May 14, 2009 at 12:55 PM, Darin Adler <darin at apple.com> wrote:

    On May 14, 2009, at 8:48 AM, Gopal Raghavan wrote:

        Any idea why only the first argument is passed to  client ?


    It’s a bug. There’s an internal Apple report of this in the Mac OS X
public API that ChromeClient is used for:

       <rdar://problem/6453834> -webView:addMessageToConsole: passes
console.log's first argument rather than the composed string

    but I don’t know of a report of it in bugs.webkit.org. Feel free to file
a bug report, or to try your hand at fixing it. It could be challenging to fix.

       -- Darin


On Fri, May 29, 2009 at 1:02 PM, Gopal Raghavan <gop.rag at gmail.com> wrote:

    Darin,
    Under which component should I file this bug?
    WebKit Misc
    WebCore JavaScript
    WebCore Misc
    ...

    I have also coded a patch for this.
    Thanks,
    --
    Gopal



On Fri, May 29, 2009 at 1:07 PM, Darin Adler <darin at apple.com> wrote:

    On May 29, 2009, at 10:02 AM, Gopal Raghavan wrote:

        Under which component should I file this bug?
        WebKit Misc
        WebCore JavaScript
        WebCore Misc


    I think WebCore Misc would be fine. See related
https://bugs.webkit.org/show_bug.cgi?id=24496

       -- Darin


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list