Commit 26e51bf8 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

bindings: Move UnionTypeConversionMode to V8BindingForCore.h.

We want to remove Nullable.h, but UnionTypeConversionMode needs to remain.
Move it to V8BindingForCore.h, as the enum is generally used in ToImpl()
calls.

While here, document it a little bit.

Bug: 798464
Change-Id: Iecbb481114ad934264dcfb0efffc248bcc420981
Reviewed-on: https://chromium-review.googlesource.com/891019Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#532387}
parent 9d503819
...@@ -10,11 +10,6 @@ ...@@ -10,11 +10,6 @@
namespace blink { namespace blink {
enum class UnionTypeConversionMode {
kNullable,
kNotNullable,
};
template <typename T> template <typename T>
class Nullable { class Nullable {
DISALLOW_NEW(); DISALLOW_NEW();
......
...@@ -73,6 +73,16 @@ class LocalDOMWindow; ...@@ -73,6 +73,16 @@ class LocalDOMWindow;
class LocalFrame; class LocalFrame;
class XPathNSResolver; class XPathNSResolver;
// Determines how a V8 -> C++ union conversion should be performed: when the
// JavaScript value being converted is either undefined or null, kNullable will
// stop the conversion attempt and the union's IsNull() method will return true.
// If kNotNullable is used, the other conversion steps listed in
// https://heycam.github.io/webidl/#es-union will continue being attempted.
enum class UnionTypeConversionMode {
kNullable,
kNotNullable,
};
template <typename CallbackInfo> template <typename CallbackInfo>
inline void V8SetReturnValue(const CallbackInfo& callback_info, inline void V8SetReturnValue(const CallbackInfo& callback_info,
DOMWindow* impl) { DOMWindow* impl) {
......
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