Commit d2104e4a authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

bind-gen: Fix IDL constant installation (callback case)

V8 doesn't allow to specify v8::SideEffectType::kHasNoSideEffect
even when there is no setter and the property is v8::ReadOnly.
Fixes the flag.

Bug: 839389
Change-Id: I579dffaa243f709e090747e29d513564b9c830f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134746Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756189}
parent 1a55c77c
......@@ -725,13 +725,13 @@ void V8DOMConfiguration::InstallConstants(
static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete),
v8::Local<v8::AccessorSignature>(), v8::DEFAULT,
v8::SideEffectType::kHasNoSideEffect,
v8::SideEffectType::kHasNoSideEffect);
v8::SideEffectType::kHasSideEffect);
prototype_template->SetNativeDataProperty(
name, constants[i].getter, nullptr, v8::Local<v8::Value>(),
static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete),
v8::Local<v8::AccessorSignature>(), v8::DEFAULT,
v8::SideEffectType::kHasNoSideEffect,
v8::SideEffectType::kHasNoSideEffect);
v8::SideEffectType::kHasSideEffect);
}
}
......
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