Commit 29b65188 authored by yangguo@chromium.org's avatar yangguo@chromium.org

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