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

Issue 803448 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OoO until Feb 4th
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

onunhandledrejection event.reason is not correct for Promise.reject(null)

Reported by ben.gour...@bugsnag.com, Jan 18 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce the problem:
1. download the attachment index.html
2. open page in Chrome
3. compare console output for each button

What is the expected behavior?
Each button on the page calls Promise.reject(val) where val is a different "falsey" value. All values get passed correctly to the event.reason property in the window.onunhandledrejection callback.

What went wrong?
All values work as expected except null.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 63.0.3239.132  Channel: stable
OS Version: OS X 10.12.6
Flash Version:
 
index.html
785 bytes View Download
Screen Shot 2018-01-18 at 14.07.30.png
73.3 KB View Download
Components: Blink>JavaScript
Labels: Needs-Triage-M63
Labels: Triaged-ET M-65 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Mac 10.12.6, Win-10 and Ubuntu 14.04 using chrome reported version #63.0.3239.132 and latest canary #65.0.3324.0.
This is a non-regression issue as it is observed from M50 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Components: -Blink>JavaScript Blink>JavaScript>Language
Status: Available (was: Untriaged)

Comment 5 by adamk@chromium.org, Jan 31 2018

Components: -Blink>JavaScript>Language Blink>Bindings Blink>HTML
Status: Untriaged (was: Available)
Labels: -Needs-Triage-M63
Owner: raphael....@intel.com
Status: Started (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 1 2018

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

commit 05865333959b92ae34caa4c61bc0e76358c71b8d
Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Thu Feb 01 06:44:57 2018

bindings: Allow `any' dictionary members to be null.

We had been using the same checks for both object and any Web IDL types to
determine if they were present, namely

    !(member.IsEmpty() || member.IsNull() || member.IsUndefined())

However, both `null' and `undefined' are valid values for the any type, and
they should be considered distinct.

Add a separate check for any types without the "member.IsNull()" part of the
above one, so that one can pass `null' to an any member and get it back
instead of `undefined'.

Bug:  803448 
Change-Id: I90dce8f0fc6c0f4d4764d724501a58cf26e92526
Reviewed-on: https://chromium-review.googlesource.com/895304
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#533601}
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/LayoutTests/bindings/idl-dictionary-unittest-expected.txt
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/LayoutTests/bindings/idl-dictionary-unittest.html
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/Source/core/testing/DictionaryTest.cpp
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/Source/core/testing/DictionaryTest.h
[modify] https://crrev.com/05865333959b92ae34caa4c61bc0e76358c71b8d/third_party/WebKit/Source/core/testing/InternalDictionary.idl

Cc: haraken@chromium.org yukishiino@chromium.org
Labels: -M-65 M-66
Status: Fixed (was: Started)
Adding the M-66 label unless someone thinks this should be backported to M65.

Sign in to add a comment