[webkit-reviews] review denied: [Bug 172768] [JSC] WTFGetBacktrace can return numberOfFrames == 0 in some architectures : [Attachment 314215] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 29 20:29:39 PDT 2017


Mark Lam <mark.lam at apple.com> has denied  review:
Bug 172768: [JSC] WTFGetBacktrace can return numberOfFrames == 0 in some
architectures
https://bugs.webkit.org/show_bug.cgi?id=172768

Attachment 314215: Patch

https://bugs.webkit.org/attachment.cgi?id=314215&action=review




--- Comment #16 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 314215
  --> https://bugs.webkit.org/attachment.cgi?id=314215
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314215&action=review

ExceptionScope::unexpectedExceptionMessage() expects the StackTrace object to
always succeed, which I think is a reasonable expectation.  There's nothing
that says that the StackTrace object has to contain any frames.  How about just
doing a more minimal change instead (see comment in
StackTrace::captureStackTrace() below) ...

> Source/WTF/wtf/StackTrace.cpp:72
> +    if (!numberOfFrames)
> +	   return nullptr;
> +
>      RELEASE_ASSERT(numberOfFrames >= framesToSkip);
>      trace->m_size = numberOfFrames - framesToSkip;

I suggest undoing everything else, and changing this to:

    if (numberOfFrames) {
	RELEASE_ASSERT(numberOfFrames >= framesToSkip);
	trace->m_size = numberOfFrames - framesToSkip;
    } else
	trace->m_size = 0;


More information about the webkit-reviews mailing list