Commit 1d457011 authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

bind-gen: Make some of bindings::V8SetReturnValue inline functions

Annotates some of bindings::V8SetReturnValue with 'inline' so that
the perf on Android improves.
blink_perf.bindings/node-type improves by ~7%.

Bug: 839389
Change-Id: I32162c4712d828616785747ce7f5688f5511808c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2348493
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797230}
parent 22a56acc
......@@ -177,8 +177,8 @@ void V8SetReturnValue(const CallbackInfo& info, double value) {
// the IDL type because Blink is not always respectful to IDL types. These
// functions fix such a type mismatch.
template <typename CallbackInfo, typename BlinkType, typename IdlType>
typename std::enable_if_t<std::is_arithmetic<BlinkType>::value ||
std::is_enum<BlinkType>::value>
inline typename std::enable_if_t<std::is_arithmetic<BlinkType>::value ||
std::is_enum<BlinkType>::value>
V8SetReturnValue(const CallbackInfo& info,
BlinkType value,
V8ReturnValue::PrimitiveType<IdlType>) {
......@@ -186,9 +186,9 @@ V8SetReturnValue(const CallbackInfo& info,
}
template <typename CallbackInfo, typename BlinkType>
void V8SetReturnValue(const CallbackInfo& info,
BlinkType* value,
V8ReturnValue::PrimitiveType<bool>) {
inline void V8SetReturnValue(const CallbackInfo& info,
BlinkType* value,
V8ReturnValue::PrimitiveType<bool>) {
V8SetReturnValue(info, bool(value));
}
......
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