New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 692834 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

DCHECK in SyncInternalsMessageHandler::HandleGetAllNodes on iOS

Project Member Reported by pav...@chromium.org, Feb 16 2017

Issue description

HandleGetAllNodes hits DCHECK when extraction request_id:

  int request_id = 0;
  bool success = args->GetInteger(0, &request_id);
  DCHECK(success);

The reason is that on iOS numeric values are passed to handlers as doubles.

The fix is to use ExtractIntegerValue instead.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80325c70ccf2bb0cc17cca4fe30f6eaae9e278dc

commit 80325c70ccf2bb0cc17cca4fe30f6eaae9e278dc
Author: pavely <pavely@chromium.org>
Date: Tue Feb 21 21:07:21 2017

[Sync] Use ExtractIntegerValue to extract request_id from js args

The scenario is: chrome_sync.js passes integer request_id when calling
getAllNodes. SyncInternalsMessageHandler::HandleGetAllNodes tries to extract
this integer with GetInteger function.

The issue is that because on iOS numeric values are passed as double,
GetInteger fails and DCHECK gets triggered.

The fix is to call ExtractIntegerValue that correctly handles converting
double to int.

BUG= 692834 
R=pnoland@chromium.org

Review-Url: https://codereview.chromium.org/2698603003
Cr-Commit-Position: refs/heads/master@{#451831}

[modify] https://crrev.com/80325c70ccf2bb0cc17cca4fe30f6eaae9e278dc/chrome/browser/ui/webui/sync_internals_message_handler.cc
[modify] https://crrev.com/80325c70ccf2bb0cc17cca4fe30f6eaae9e278dc/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc

Comment 2 by pav...@chromium.org, Feb 21 2017

Status: Fixed (was: Started)

Sign in to add a comment