Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: src/json-parser.h

Issue 10989032: Fix probing in JSON.parse. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index 21c3623ef88fc5d0058c4ffdf32fcfeaa580c9cc..8eb4f67f22e1c2a7e6c175d8a0f30e1c5c119062 100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -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);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698