@@ -636,7 +636,7 @@ class ESCARGOT_EXPORT ExecutionStateRef {
636636 GCManagedVector<FunctionObjectRef*> resolveCallstack (); // resolve list of callee
637637 GlobalObjectRef* resolveCallerLexicalGlobalObject (); // resolve caller's lexical global object
638638
639- // these 3 functions are used only for test purpose
639+ // only enabled when `ENABLE_EXTENDED_API` macro is set (default: disabled)
640640 bool onTry ();
641641 bool onCatch ();
642642 bool onFinally ();
@@ -662,6 +662,8 @@ class ESCARGOT_EXPORT VMInstanceRef {
662662
663663 // register ErrorCallback which is triggered when each Error constructor (e.g. new TypeError()) invoked or thrown
664664 // parameter `err` stands for the newly created ErrorObject
665+ // these functions are used only for third party usage
666+ // only enabled when `ENABLE_EXTENDED_API` macro is set (default: disabled)
665667 typedef void (*ErrorCallback)(ExecutionStateRef* state, ErrorObjectRef* err);
666668 void registerErrorCreationCallback (ErrorCallback cb);
667669 void registerErrorThrowCallback (ErrorCallback cb);
@@ -1956,6 +1958,7 @@ class ESCARGOT_EXPORT FinalizationRegistryObjectRef : public ObjectRef {
19561958// it is not intented operation
19571959// Note) only String or Symbol type is allowed for `propertyName`
19581960// because TemplateRef is set without ExecutionStateRef, so property name conversion is impossible.
1961+ // only enabled when `ENABLE_EXTENDED_API` macro is set (default: disabled)
19591962class ESCARGOT_EXPORT TemplateRef {
19601963public:
19611964 void set (ValueRef* propertyName, ValueRef* data, bool isWritable, bool isEnumerable, bool isConfigurable);
@@ -2039,13 +2042,7 @@ struct ESCARGOT_EXPORT ObjectTemplatePropertyHandlerConfiguration {
20392042 }
20402043};
20412044
2042- class ESCARGOT_EXPORT SerializerRef {
2043- public:
2044- // returns the serialization was successful
2045- static bool serializeInto (ValueRef* value, std::ostringstream& output);
2046- static ValueRef* deserializeFrom (ContextRef* context, std::istringstream& input);
2047- };
2048-
2045+ // only enabled when `ENABLE_EXTENDED_API` macro is set (default: disabled)
20492046class ESCARGOT_EXPORT ObjectTemplateRef : public TemplateRef {
20502047public:
20512048 static ObjectTemplateRef* create ();
@@ -2062,6 +2059,7 @@ class ESCARGOT_EXPORT ObjectTemplateRef : public TemplateRef {
20622059};
20632060
20642061// FunctionTemplateRef returns the unique function instance in context.
2062+ // only enabled when `ENABLE_EXTENDED_API` macro is set (default: disabled)
20652063class ESCARGOT_EXPORT FunctionTemplateRef : public TemplateRef {
20662064public:
20672065 // in constructor call, thisValue is default consturcted object
@@ -2084,6 +2082,13 @@ class ESCARGOT_EXPORT FunctionTemplateRef : public TemplateRef {
20842082 OptionalRef<FunctionTemplateRef> parent ();
20852083};
20862084
2085+ class ESCARGOT_EXPORT SerializerRef {
2086+ public:
2087+ // returns the serialization was successful
2088+ static bool serializeInto (ValueRef* value, std::ostringstream& output);
2089+ static ValueRef* deserializeFrom (ContextRef* context, std::istringstream& input);
2090+ };
2091+
20872092class ESCARGOT_EXPORT ScriptParserRef {
20882093public:
20892094 struct ESCARGOT_EXPORT InitializeScriptResult {
0 commit comments