Commit 89c4ecb8 authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

v8binding: Minor fix of OnBeforeUnloadEventHandler's return value

The return type of OnBeforeUnloadEventHandler is DOMString?, so
we should use V8StringResource<kTreatNullAsNullString> instead
of V8String<kDefaultMode>.

Change-Id: I6df9581cf5dd01ae8215d773c95a3e9dc6a78e08
Reviewed-on: https://chromium-review.googlesource.com/c/1341779Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609219}
parent 5a5292e2
......@@ -135,7 +135,7 @@ void JSEventHandler::InvokeInternal(EventTarget& event_target,
String result_for_beforeunload;
if (IsOnBeforeUnloadEventHandler()) {
// TODO(yukiy): use |NativeValueTraits|.
V8StringResource<> native_result(v8_return_value);
V8StringResource<kTreatNullAsNullString> native_result(v8_return_value);
// |native_result.Prepare()| throws exception if it fails to convert
// |native_result| to String.
......
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