[webkit-reviews] review denied: [Bug 100650] Web Inspector: Autogenerate stack traces and line numbers when possible. : [Attachment 177254] Now with less crashing.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 3 09:57:33 PST 2012


Yury Semikhatsky <yurys at chromium.org> has denied  review:
Bug 100650: Web Inspector: Autogenerate stack traces and line numbers when
possible.
https://bugs.webkit.org/show_bug.cgi?id=100650

Attachment 177254: Now with less crashing.
https://bugs.webkit.org/attachment.cgi?id=177254&action=review

------- Additional Comments from Yury Semikhatsky <yurys at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=177254&action=review


> Source/WebCore/inspector/ConsoleMessage.cpp:118
> +    m_callStack = state ? createScriptCallStackForConsole(state) :
createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true);

createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true) still
can fail in case of workers if someone forgets to pass non-0 state?

> Source/WebCore/workers/WorkerContext.cpp:309
> +	   InspectorInstrumentation::addMessageToConsole(this, source, type,
level, message, sourceURL, lineNumber, scriptStateFromWorkerContext(this),
requestIdentifier);

Retrieving script state from worker context will not give you access to the top
frame and so you will always have empty stack trace in such cases. You should
use ScriptState* that is available where the message is logged just like you do
in case of document. There is no  'console' binding in worker contexts so far
but we should either provide correct implementation or postpone that until when
we add 'console' binding to workers.


More information about the webkit-reviews mailing list