[webkit-reviews] review granted: [Bug 41948] REGRESSION(r60392): Registerfile can be unwound too far following an exception : [Attachment 71328] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 20 13:29:57 PDT 2010


Darin Adler <darin at apple.com> has granted Geoffrey Garen <ggaren at apple.com>'s
request for review:
Bug 41948: REGRESSION(r60392): Registerfile can be unwound too far following an
exception
https://bugs.webkit.org/show_bug.cgi?id=41948

Attachment 71328: patch
https://bugs.webkit.org/attachment.cgi?id=71328&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=71328&action=review

> JavaScriptCore/interpreter/Interpreter.cpp:680
> +    for (CallFrame* callerFrame =
callFrame->callerFrame()->removeHostCallFrameFlag(); callerFrame; callerFrame =
callerFrame->callerFrame()->removeHostCallFrameFlag()) {

This looks a bit like a while rather than for. I always wonder which to use in
cases like this one.

> JavaScriptCore/interpreter/Interpreter.cpp:687
> +	   if (callerHighWaterMark <= highWaterMark)
> +	       continue;
> +	   highWaterMark = callerHighWaterMark;

You could use max() here instead of an if statement. I think it looks good that
way:

    highWaterMark = max(highWaterMark, callerFrame->registers() +
codeBlock->m_numCalleeRegisters);


More information about the webkit-reviews mailing list