Commit 7cb5a752 authored by Michaël Zasso's avatar Michaël Zasso Committed by Commit Bot

Fix potential nullptr dereference

We found this while trying to integrate V8 6.3 into Node.js. One of the
tests started to crash on Windows.

https: //github.com/nodejs/node/pull/16271#issuecomment-337790715
Bug: 
Change-Id: I82514ff7b9ca6a2b5c4489fe7388c4beda9931c9
Reviewed-on: https://chromium-review.googlesource.com/735400Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
Cr-Commit-Position: refs/heads/master@{#48899}
parent dd0a37f2
......@@ -1892,10 +1892,10 @@ void JavaScriptFrame::Print(StringStream* accumulator,
Context* context = nullptr;
if (this->context() != nullptr && this->context()->IsContext()) {
context = Context::cast(this->context());
}
while (context->IsWithContext()) {
context = context->previous();
DCHECK_NOT_NULL(context);
while (context->IsWithContext()) {
context = context->previous();
DCHECK_NOT_NULL(context);
}
}
// Print heap-allocated local variables.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment