Fix probing in JSON.parse.

R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/10989032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2012-09-26 14:59:10 +00:00
parent 944f933332
commit 29b6518874

View File

@ -590,10 +590,10 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() {
seq_source_->GetChars() + position_, length); seq_source_->GetChars() + position_, length);
SymbolTable* symbol_table = isolate()->heap()->symbol_table(); SymbolTable* symbol_table = isolate()->heap()->symbol_table();
uint32_t capacity = symbol_table->Capacity(); uint32_t capacity = symbol_table->Capacity();
uint32_t index = SymbolTable::FirstProbe(hash, capacity); uint32_t entry = SymbolTable::FirstProbe(hash, capacity);
uint32_t count = 1; uint32_t count = 1;
while (true) { while (true) {
Object* element = symbol_table->KeyAt(index); Object* element = symbol_table->KeyAt(entry);
if (element == isolate()->heap()->raw_unchecked_undefined_value()) { if (element == isolate()->heap()->raw_unchecked_undefined_value()) {
// Lookup failure. // Lookup failure.
break; break;
@ -606,7 +606,7 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() {
AdvanceSkipWhitespace(); AdvanceSkipWhitespace();
return Handle<String>(String::cast(element)); return Handle<String>(String::cast(element));
} }
index = SymbolTable::NextProbe(hash, count++, capacity); entry = SymbolTable::NextProbe(entry, count++, capacity);
} }
} }