Commit cba49619 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Revert "Alias 4KB at the beginning of JSONParser::ConsumeDictionary() to help...

Revert "Alias 4KB at the beginning of JSONParser::ConsumeDictionary() to help diagnose issue 791487."

This reverts commit f09eb6cc.

Reason for revert: diagnosis of issue complete.

Original change's description:
> Alias 4KB at the beginning of JSONParser::ConsumeDictionary() to help diagnose issue 791487.
> 
> R=​siggi@chromium.org
> 
> Bug: 791487
> Change-Id: I4535df5a52167f2f5b10424a07e035e1c46e8cfb
> Reviewed-on: https://chromium-review.googlesource.com/850722
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Sigurður Ásgeirsson <siggi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#527154}

TBR=gab@chromium.org,siggi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 791487
Change-Id: Ic9dff2009411498a97ba3c1e488254414659a5ef
Reviewed-on: https://chromium-review.googlesource.com/1059735Reviewed-by: default avatarSigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558881}
parent 3071ee7b
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "base/debug/alias.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/numerics/safe_conversions.h" #include "base/numerics/safe_conversions.h"
...@@ -327,16 +326,6 @@ Optional<Value> JSONParser::ParseToken(Token token) { ...@@ -327,16 +326,6 @@ Optional<Value> JSONParser::ParseToken(Token token) {
} }
Optional<Value> JSONParser::ConsumeDictionary() { Optional<Value> JSONParser::ConsumeDictionary() {
// Attempt to alias 4KB of the buffer about to be read. Need to alias multiple
// sites as the crashpad heuristics only grab a few hundred bytes in
// front/behind heap pointers on the stack.
// TODO(gab): Remove this after diagnosis of https://crbug.com/791487 is
// complete.
const char* initial_pos[16];
for (size_t i = 0; i < arraysize(initial_pos); ++i)
initial_pos[i] = pos() + i * 256;
debug::Alias(&initial_pos);
if (ConsumeChar() != '{') { if (ConsumeChar() != '{') {
ReportError(JSONReader::JSON_UNEXPECTED_TOKEN, 1); ReportError(JSONReader::JSON_UNEXPECTED_TOKEN, 1);
return nullopt; return nullopt;
......
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