Commit 6b1dd6b2 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix rare access violation during JS heap serialization.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/510013002

Patch from Slava Chigrin <vchigrin@yandex-team.ru>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0b1e18c2
......@@ -1532,7 +1532,8 @@ void Serializer::ObjectSerializer::VisitPointers(Object** start,
current_contents == current[-1]) {
DCHECK(!serializer_->isolate()->heap()->InNewSpace(current_contents));
int repeat_count = 1;
while (current < end - 1 && current[repeat_count] == current_contents) {
while (&current[repeat_count] < end - 1 &&
current[repeat_count] == current_contents) {
repeat_count++;
}
current += repeat_count;
......
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