Commit 9a9120ea authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

PromiseRejectionEvent: Update comment to match what the code is doing.

Since e1c54ad2 ("Update
PromiseRejectionEvent IDL to match latest spec") from more than 2 years ago
the code is returning undefined instead of null. Make the comment match the
code to avoid confusion.

TBR=yukishiino,haraken

No-Try: True
Change-Id: Ie931aef81fbe7510ccbf7b1c0e3753b32a64e948
Reviewed-on: https://chromium-review.googlesource.com/894384
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarRaphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#533246}
parent 7e943dac
......@@ -42,8 +42,8 @@ ScriptPromise PromiseRejectionEvent::promise(ScriptState* script_state) const {
}
ScriptValue PromiseRejectionEvent::reason(ScriptState* script_state) const {
// Return null when the value is accessed by a different world than the world
// that created the value.
// Return undefined when the value is accessed by a different world than the
// world that created the value.
if (reason_.IsEmpty() || !CanBeDispatchedInWorld(script_state->World()))
return ScriptValue(script_state, v8::Undefined(script_state->GetIsolate()));
return ScriptValue(script_state,
......
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