Add Constructor.__isJSB for JSB classes.

This commit is contained in:
James Chen 2022-12-07 14:03:56 +08:00
parent 23cbc65185
commit 7ef758e7a1
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) { bool js_register_$jsmangledname(se::Object* obj) {
$jsclass_inheritance $jsclass_inheritance
cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE);
$jsclassvariables $jsclassvariables
$jsclassfunctions $jsclassfunctions
$jsstaticclassvariables $jsstaticclassvariables

View File

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

View File

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