Changeset 69662 in webkit
- Timestamp:
- Oct 13, 2010 7:43:36 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r69658 r69662 1 2010-10-13 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: stack information is inconsistent between console.trace and runtime errors. 6 https://bugs.webkit.org/show_bug.cgi?id=47252 7 8 * inspector/console-trace-in-eval-expected.txt: Added. 9 * inspector/console-trace-in-eval.html: Added. 10 * inspector/console-uncaught-exception-in-eval-expected.txt: Added. 11 * inspector/console-uncaught-exception-in-eval.html: Added. 12 * platform/chromium/console-trace-in-eval-expected.txt: Added. 13 * platform/chromium/console-uncaught-exception-in-eval-expected.txt: Added. 14 1 15 2010-10-13 Csaba Osztrogonác <ossy@webkit.org> 2 16 -
trunk/WebCore/ChangeLog
r69660 r69662 1 2010-10-13 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: stack information is inconsistent between console.trace and runtime errors. 6 https://bugs.webkit.org/show_bug.cgi?id=47252 7 8 * console.trace() is now formatted the same way as other stack traces 9 10 * If there is //@ sourceURL=url line at the end of eval'ed script source 11 the url will be shown in the stack traces for script. That is why ScriptCallFrame::sourceURL 12 type has changed from KURL to String. 13 14 Tests: inspector/console-trace-in-eval.html 15 inspector/console-uncaught-exception-in-eval.html 16 17 * bindings/js/ScriptCallFrame.cpp: 18 (WebCore::ScriptCallFrame::ScriptCallFrame): 19 * bindings/js/ScriptCallFrame.h: 20 (WebCore::ScriptCallFrame::sourceURL): 21 * bindings/v8/ScriptCallFrame.cpp: 22 (WebCore::ScriptCallFrame::ScriptCallFrame): 23 * bindings/v8/ScriptCallFrame.h: 24 (WebCore::ScriptCallFrame::sourceURL): 25 * bindings/v8/ScriptCallStack.cpp: 26 (WebCore::getFrameLocation): 27 (WebCore::ScriptCallStack::create): 28 * bindings/v8/ScriptCallStack.h: 29 * bindings/v8/ScriptController.cpp: 30 (WebCore::ScriptController::setCaptureCallStackForUncaughtExceptions): 31 * bindings/v8/custom/V8ConsoleCustom.cpp: 32 (WebCore::V8Console::traceCallback): 33 * inspector/ConsoleMessage.cpp: 34 (WebCore::ConsoleMessage::CallFrame::buildInspectorObject): 35 (WebCore::ConsoleMessage::ConsoleMessage): 36 * inspector/ConsoleMessage.h: 37 * inspector/front-end/ConsoleView.js: 38 (WebInspector.ConsoleMessage.prototype._formatMessage): 39 * page/Console.cpp: 40 (WebCore::Console::addMessage): 41 (WebCore::Console::count): 42 (WebCore::Console::timeEnd): 43 1 44 2010-10-13 Kent Tamura <tkent@chromium.org> 2 45 -
trunk/WebCore/bindings/js/ScriptCallFrame.cpp
r60392 r69662 41 41 ScriptCallFrame::ScriptCallFrame(const UString& functionName, const UString& urlString, int lineNumber, ExecState* exec, unsigned skipArgumentCount) 42 42 : m_functionName(functionName) 43 , m_sourceURL( ParsedURLString,ustringToString(urlString))43 , m_sourceURL(ustringToString(urlString)) 44 44 , m_lineNumber(lineNumber) 45 45 { -
trunk/WebCore/bindings/js/ScriptCallFrame.h
r60392 r69662 32 32 #define ScriptCallFrame_h 33 33 34 #include "KURL.h"35 34 #include <runtime/ArgList.h> 36 35 #include "ScriptString.h" … … 55 54 56 55 const ScriptString& functionName() const { return m_functionName; } 57 const KURL& sourceURL() const { return m_sourceURL; }56 const String& sourceURL() const { return m_sourceURL; } 58 57 unsigned lineNumber() const { return m_lineNumber; } 59 58 … … 64 63 private: 65 64 ScriptString m_functionName; 66 KURLm_sourceURL;65 String m_sourceURL; 67 66 unsigned m_lineNumber; 68 67 -
trunk/WebCore/bindings/v8/ScriptCallFrame.cpp
r63548 r69662 43 43 ScriptCallFrame::ScriptCallFrame(const String& functionName, const String& urlString, int lineNumber, const v8::Arguments& arguments, unsigned skipArgumentCount) 44 44 : m_functionName(functionName) 45 , m_sourceURL( ParsedURLString,urlString)45 , m_sourceURL(urlString) 46 46 , m_lineNumber(lineNumber) 47 47 { … … 52 52 ScriptCallFrame::ScriptCallFrame(const String& functionName, const String& urlString, int lineNumber) 53 53 : m_functionName(functionName) 54 , m_sourceURL( ParsedURLString,urlString)54 , m_sourceURL(urlString) 55 55 , m_lineNumber(lineNumber) 56 56 { -
trunk/WebCore/bindings/v8/ScriptCallFrame.h
r63548 r69662 55 55 56 56 const ScriptString& functionName() const { return m_functionName; } 57 const KURL& sourceURL() const { return m_sourceURL; }57 const String& sourceURL() const { return m_sourceURL; } 58 58 unsigned lineNumber() const { return m_lineNumber; } 59 59 … … 64 64 private: 65 65 ScriptString m_functionName; 66 KURLm_sourceURL;66 String m_sourceURL; 67 67 unsigned m_lineNumber; 68 68 -
trunk/WebCore/bindings/v8/ScriptCallStack.cpp
r65320 r69662 45 45 { 46 46 ASSERT(!frame.IsEmpty()); 47 v8::Local<v8::String> sourceNameValue(frame->GetScriptName ());47 v8::Local<v8::String> sourceNameValue(frame->GetScriptNameOrSourceURL()); 48 48 v8::Local<v8::String> functionNameValue(frame->GetFunctionName()); 49 49 *sourceName = sourceNameValue.IsEmpty() ? "" : toWebCoreString(sourceNameValue); … … 86 86 87 87 const int ScriptCallStack::maxCallStackSizeToCapture = 200; 88 const v8::StackTrace::StackTraceOptions ScriptCallStack::stackTraceOptions = static_cast<v8::StackTrace::StackTraceOptions>( 89 v8::StackTrace::kLineNumber 90 | v8::StackTrace::kColumnOffset 91 | v8::StackTrace::kScriptNameOrSourceURL 92 | v8::StackTrace::kFunctionName); 93 88 94 89 95 PassOwnPtr<ScriptCallStack> ScriptCallStack::create(const v8::Arguments& arguments, unsigned skipArgumentCount, int framCountLimit) … … 92 98 v8::Local<v8::Context> context = v8::Context::GetCurrent(); 93 99 v8::Context::Scope contextScope(context); 94 v8::Handle<v8::StackTrace> stackTrace(v8::StackTrace::CurrentStackTrace(framCountLimit ));100 v8::Handle<v8::StackTrace> stackTrace(v8::StackTrace::CurrentStackTrace(framCountLimit, ScriptCallStack::stackTraceOptions)); 95 101 96 102 if (stackTrace.IsEmpty()) -
trunk/WebCore/bindings/v8/ScriptCallStack.h
r64735 r69662 49 49 public: 50 50 static const int maxCallStackSizeToCapture; 51 static const v8::StackTrace::StackTraceOptions stackTraceOptions; 51 52 52 53 static PassOwnPtr<ScriptCallStack> create(const v8::Arguments&, unsigned skipArgumentCount = 0, int framCountLimit = 1); -
trunk/WebCore/bindings/v8/ScriptController.cpp
r68630 r69662 467 467 468 468 #if ENABLE(INSPECTOR) 469 void ScriptController::setCaptureCallStackForUncaughtExceptions(bool )470 { 471 v8::V8::SetCaptureStackTraceForUncaughtExceptions( true, ScriptCallStack::maxCallStackSizeToCapture);469 void ScriptController::setCaptureCallStackForUncaughtExceptions(bool value) 470 { 471 v8::V8::SetCaptureStackTraceForUncaughtExceptions(value, ScriptCallStack::maxCallStackSizeToCapture, ScriptCallStack::stackTraceOptions); 472 472 } 473 473 #endif -
trunk/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
r63805 r69662 65 65 v8::HandleScope handleScope; 66 66 ScriptState* scriptState = ScriptState::current(); 67 v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(ScriptCallStack::maxCallStackSizeToCapture );67 v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(ScriptCallStack::maxCallStackSizeToCapture, ScriptCallStack::stackTraceOptions); 68 68 OwnPtr<ScriptCallStack> callStack(ScriptCallStack::create(scriptState, stackTrace)); 69 69 imp->trace(callStack.get()); -
trunk/WebCore/inspector/ConsoleMessage.cpp
r65891 r69662 68 68 RefPtr<InspectorObject> frame = InspectorObject::create(); 69 69 frame->setString("functionName", m_functionName); 70 frame->setString("sourceURL", m_sourceURL .string());70 frame->setString("sourceURL", m_sourceURL); 71 71 frame->setNumber("lineNumber", m_lineNumber); 72 72 return frame; … … 101 101 const ScriptCallFrame& lastCaller = callStack->at(0); 102 102 m_line = lastCaller.lineNumber(); 103 m_url = lastCaller.sourceURL() .string();103 m_url = lastCaller.sourceURL(); 104 104 105 105 if (storeTrace) { -
trunk/WebCore/inspector/ConsoleMessage.h
r65891 r69662 73 73 private: 74 74 String m_functionName; 75 KURLm_sourceURL;75 String m_sourceURL; 76 76 unsigned m_lineNumber; 77 77 }; -
trunk/WebCore/inspector/front-end/ConsoleView.js
r69010 r69662 680 680 var ol = document.createElement("ol"); 681 681 ol.addStyleClass("stack-trace"); 682 var treeOutline = new TreeOutline(ol); 683 var messageText; 684 if (this.type === WebInspector.ConsoleMessage.MessageType.Assert) 685 messageText = this._format(this._parameters); 686 else if (this.type === WebInspector.ConsoleMessage.MessageType.Trace) 687 messageText = document.createTextNode("console.trace()"); 688 else 689 messageText = document.createTextNode(this._messageText); 690 691 var content = document.createElement("div"); 692 this._addMessageHeader(content, messageText); 693 var root = new TreeElement(content, null, true); 694 content.treeElementForTest = root; 695 treeOutline.appendChild(root); 682 696 if (this.type === WebInspector.ConsoleMessage.MessageType.Trace) 683 ol.addStyleClass("trace-message"); 684 var treeOutline = new TreeOutline(ol); 685 686 var root = treeOutline; 687 if (this.type === WebInspector.ConsoleMessage.MessageType.UncaughtException || 688 this.type === WebInspector.ConsoleMessage.MessageType.Assert) { 689 var messageText; 690 if (this.type === WebInspector.ConsoleMessage.MessageType.Assert) 691 messageText = this._format(this._parameters); 692 else 693 messageText = document.createTextNode(this._messageText); 694 695 var content = document.createElement("div"); 696 this._addMessageHeader(content, messageText); 697 root = new TreeElement(content, null, true); 698 content.treeElementForTest = root; 699 treeOutline.appendChild(root); 700 } 697 root.expand(); 701 698 702 699 this._populateStackTraceTreeElement(root); -
trunk/WebCore/page/Console.cpp
r65506 r69662 183 183 String message; 184 184 if (getFirstArgumentAsString(callStack->state(), lastCaller, message)) 185 page->chrome()->client()->addMessageToConsole(JSMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.sourceURL() .prettyURL());185 page->chrome()->client()->addMessageToConsole(JSMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); 186 186 187 187 #if ENABLE(INSPECTOR) … … 192 192 return; 193 193 194 printSourceURLAndLine(lastCaller.sourceURL() .prettyURL(), 0);194 printSourceURLAndLine(lastCaller.sourceURL(), 0); 195 195 printMessageSourceAndLevelPrefix(JSMessageSource, level); 196 196 … … 270 270 getFirstArgumentAsString(callStack->state(), lastCaller, title); 271 271 272 page->inspectorController()->count(title, lastCaller.lineNumber(), lastCaller.sourceURL() .string());272 page->inspectorController()->count(title, lastCaller.lineNumber(), lastCaller.sourceURL()); 273 273 #else 274 274 UNUSED_PARAM(callStack); … … 414 414 415 415 const ScriptCallFrame& lastCaller = callStack->at(0); 416 page->inspectorController()->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lastCaller.lineNumber(), lastCaller.sourceURL() .string());416 page->inspectorController()->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lastCaller.lineNumber(), lastCaller.sourceURL()); 417 417 #else 418 418 UNUSED_PARAM(title); -
trunk/WebKit/chromium/ChangeLog
r69633 r69662 1 2010-10-13 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: stack information is inconsistent between console.trace and runtime errors. 6 https://bugs.webkit.org/show_bug.cgi?id=47252 7 8 * DEPS: bump up V8 revision 9 1 10 2010-10-12 Kenneth Russell <kbr@google.com> 2 11 -
trunk/WebKit/chromium/DEPS
r69617 r69662 33 33 vars = { 34 34 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', 35 'chromium_rev': '623 49',35 'chromium_rev': '62399', 36 36 } 37 37
Note: See TracChangeset
for help on using the changeset viewer.