OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 ExecutionContext* Console::context() | 59 ExecutionContext* Console::context() |
60 { | 60 { |
61 if (!m_frame) | 61 if (!m_frame) |
62 return 0; | 62 return 0; |
63 return m_frame->document(); | 63 return m_frame->document(); |
64 } | 64 } |
65 | 65 |
66 void Console::reportMessageToClient(MessageLevel level, const String& message, P
assRefPtr<ScriptCallStack> callStack) | 66 void Console::reportMessageToClient(MessageLevel level, const String& message, P
assRefPtrWillBeRawPtr<ScriptCallStack> callStack) |
67 { | 67 { |
68 if (!m_frame || !m_frame->host() || !callStack.get()) | 68 if (!m_frame || !m_frame->host() || !callStack.get()) |
69 return; | 69 return; |
70 | 70 |
71 String stackTrace; | 71 String stackTrace; |
72 if (m_frame->chromeClient().shouldReportDetailedMessageForSource(callStack->
at(0).sourceURL())) { | 72 if (m_frame->chromeClient().shouldReportDetailedMessageForSource(callStack->
at(0).sourceURL())) { |
73 RefPtr<ScriptCallStack> fullStack = createScriptCallStack(ScriptCallStac
k::maxCallStackSizeToCapture); | 73 RefPtrWillBeRawPtr<ScriptCallStack> fullStack = createScriptCallStack(Sc
riptCallStack::maxCallStackSizeToCapture); |
74 stackTrace = FrameConsole::formatStackTraceString(message, fullStack); | 74 stackTrace = FrameConsole::formatStackTraceString(message, fullStack); |
75 } | 75 } |
76 m_frame->chromeClient().addMessageToConsole(m_frame, ConsoleAPIMessageSource
, level, message, callStack->at(0).lineNumber(), callStack->at(0).sourceURL(), s
tackTrace); | 76 m_frame->chromeClient().addMessageToConsole(m_frame, ConsoleAPIMessageSource
, level, message, callStack->at(0).lineNumber(), callStack->at(0).sourceURL(), s
tackTrace); |
77 } | 77 } |
78 | 78 |
79 PassRefPtrWillBeRawPtr<MemoryInfo> Console::memory() const | 79 PassRefPtrWillBeRawPtr<MemoryInfo> Console::memory() const |
80 { | 80 { |
81 // FIXME: Because we create a new object here each time, | 81 // FIXME: Because we create a new object here each time, |
82 // console.memory !== console.memory, which seems wrong. | 82 // console.memory !== console.memory, which seems wrong. |
83 return MemoryInfo::create(); | 83 return MemoryInfo::create(); |
84 } | 84 } |
85 | 85 |
86 } // namespace WebCore | 86 } // namespace WebCore |
OLD | NEW |