Add Constructor.__isJSB for JSB classes. (#321)

This commit is contained in:
James Chen 2022-12-07 14:07:53 +08:00 committed by GitHub
parent 23cbc65185
commit b1d2c74774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -278,6 +278,7 @@ SE_DECLARE_FINALIZE_FUNC(js_delete_$jsdtor) %}
%{
bool js_register_$jsmangledname(se::Object* obj) {
$jsclass_inheritance
cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE);
$jsclassvariables
$jsclassfunctions
$jsstaticclassvariables

View File

@ -278,6 +278,7 @@ SE_DECLARE_FINALIZE_FUNC(js_delete_$jsdtor) %}
%{
bool js_register_$jsmangledname(se::Object* obj) {
$jsclass_inheritance
cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE);
$jsclassvariables
$jsclassfunctions
$jsstaticclassvariables

View File

@ -278,6 +278,7 @@ SE_DECLARE_FINALIZE_FUNC(js_delete_$jsdtor) %}
%{
bool js_register_$jsmangledname(se::Object* obj) {
$jsclass_inheritance
cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE);
$jsclassvariables
$jsclassfunctions
$jsstaticclassvariables