Permalink
Browse files

core, bugfix: name is 'undefined' in operator function.

  • Loading branch information...
xicilion committed Jul 12, 2018
1 parent b921417 commit 83ad511e9bf31cc572248863c76b0a862e7031b1
@@ -537,7 +537,7 @@ inline void Buffer_base::i_IndexedGetter(uint32_t index, const v8::PropertyCallb
{
int32_t vr;
METHOD_NAME("Buffer.undefined");
METHOD_NAME("Buffer[]");
METHOD_INSTANCE(Buffer_base);
PROPERTY_ENTER();
@@ -550,7 +550,7 @@ inline void Buffer_base::i_IndexedGetter(uint32_t index, const v8::PropertyCallb
inline void Buffer_base::i_IndexedSetter(uint32_t index, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& args)
{
METHOD_NAME("Buffer.undefined");
METHOD_NAME("Buffer[]");
METHOD_INSTANCE(Buffer_base);
PROPERTY_ENTER();
@@ -129,7 +129,7 @@ inline void EventInfo_base::i_NamedGetter(v8::Local<v8::String> property, const
{
v8::Local<v8::Value> vr;
METHOD_NAME("EventInfo.undefined[]");
METHOD_NAME("EventInfo[]");
METHOD_INSTANCE(EventInfo_base);
PROPERTY_ENTER();
@@ -149,7 +149,7 @@ inline void EventInfo_base::i_NamedEnumerator(const v8::PropertyCallbackInfo<v8:
{
v8::Local<v8::Array> vr;
METHOD_NAME("EventInfo.undefined");
METHOD_NAME("EventInfo[]");
METHOD_INSTANCE(EventInfo_base);
PROPERTY_ENTER();
@@ -215,7 +215,7 @@ inline void HttpCollection_base::i_NamedGetter(v8::Local<v8::String> property, c
{
Variant vr;
METHOD_NAME("HttpCollection.undefined[]");
METHOD_NAME("HttpCollection[]");
METHOD_INSTANCE(HttpCollection_base);
PROPERTY_ENTER();
@@ -235,7 +235,7 @@ inline void HttpCollection_base::i_NamedEnumerator(const v8::PropertyCallbackInf
{
v8::Local<v8::Array> vr;
METHOD_NAME("HttpCollection.undefined");
METHOD_NAME("HttpCollection[]");
METHOD_INSTANCE(HttpCollection_base);
PROPERTY_ENTER();
@@ -246,7 +246,7 @@ inline void HttpCollection_base::i_NamedEnumerator(const v8::PropertyCallbackInf
inline void HttpCollection_base::i_NamedSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& args)
{
METHOD_NAME("HttpCollection.undefined");
METHOD_NAME("HttpCollection[]");
METHOD_INSTANCE(HttpCollection_base);
PROPERTY_ENTER();
@@ -267,7 +267,7 @@ inline void HttpCollection_base::i_NamedDeleter(v8::Local<v8::String> property,
{
v8::Local<v8::Boolean> vr;
METHOD_NAME("HttpCollection.undefined");
METHOD_NAME("HttpCollection[]");
METHOD_INSTANCE(HttpCollection_base);
PROPERTY_ENTER();
@@ -379,7 +379,7 @@ inline void MongoCollection_base::i_NamedGetter(v8::Local<v8::String> property,
{
obj_ptr<MongoCollection_base> vr;
METHOD_NAME("MongoCollection.undefined[]");
METHOD_NAME("MongoCollection[]");
METHOD_INSTANCE(MongoCollection_base);
PROPERTY_ENTER();
@@ -399,7 +399,7 @@ inline void MongoCollection_base::i_NamedEnumerator(const v8::PropertyCallbackIn
{
v8::Local<v8::Array> vr;
METHOD_NAME("MongoCollection.undefined");
METHOD_NAME("MongoCollection[]");
METHOD_INSTANCE(MongoCollection_base);
PROPERTY_ENTER();
@@ -129,7 +129,7 @@ inline void MongoDB_base::i_NamedGetter(v8::Local<v8::String> property, const v8
{
obj_ptr<MongoCollection_base> vr;
METHOD_NAME("MongoDB.undefined[]");
METHOD_NAME("MongoDB[]");
METHOD_INSTANCE(MongoDB_base);
PROPERTY_ENTER();
@@ -149,7 +149,7 @@ inline void MongoDB_base::i_NamedEnumerator(const v8::PropertyCallbackInfo<v8::A
{
v8::Local<v8::Array> vr;
METHOD_NAME("MongoDB.undefined");
METHOD_NAME("MongoDB[]");
METHOD_INSTANCE(MongoDB_base);
PROPERTY_ENTER();
@@ -180,7 +180,7 @@ inline void Stats_base::i_NamedGetter(v8::Local<v8::String> property, const v8::
{
int32_t vr;
METHOD_NAME("Stats.undefined[]");
METHOD_NAME("Stats[]");
METHOD_INSTANCE(Stats_base);
PROPERTY_ENTER();
@@ -200,7 +200,7 @@ inline void Stats_base::i_NamedEnumerator(const v8::PropertyCallbackInfo<v8::Arr
{
v8::Local<v8::Array> vr;
METHOD_NAME("Stats.undefined");
METHOD_NAME("Stats[]");
METHOD_INSTANCE(Stats_base);
PROPERTY_ENTER();
@@ -109,7 +109,7 @@ inline void XmlNamedNodeMap_base::i_IndexedGetter(uint32_t index, const v8::Prop
{
obj_ptr<XmlAttr_base> vr;
METHOD_NAME("XmlNamedNodeMap.undefined");
METHOD_NAME("XmlNamedNodeMap[]");
METHOD_INSTANCE(XmlNamedNodeMap_base);
PROPERTY_ENTER();
@@ -106,7 +106,7 @@ inline void XmlNodeList_base::i_IndexedGetter(uint32_t index, const v8::Property
{
obj_ptr<XmlNode_base> vr;
METHOD_NAME("XmlNodeList.undefined");
METHOD_NAME("XmlNodeList[]");
METHOD_INSTANCE(XmlNodeList_base);
PROPERTY_ENTER();
View
@@ -358,38 +358,38 @@ module.exports = function (defs, baseFolder) {
"stub_func": fn => {
if (fn.index) {
txts.push('inline void ' + cls + '_base::i_NamedGetter(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& args)\n{\n ' + get_rtype(fn.type) + ' vr;\n');
txts.push(` METHOD_NAME("${cls}.${fname}[]");`);
txts.push(` METHOD_NAME("${cls}[]");`);
txts.push(` METHOD_INSTANCE(${cls}_base);\n PROPERTY_ENTER();\n`);
txts.push(' exlib::string k;\n GetArgumentValue(isolate, property, k);\n if (class_info().has(k.c_str()))\n return;\n');
if (fn.deprecated)
txts.push(' DEPRECATED_SOON("' + cls + fn.name + '");\n');
txts.push(' hr = pInst->_named_getter(k, vr);\n if (hr == CALL_RETURN_NULL)\n return;\n');
txts.push(' METHOD_RETURN();\n}\n');
txts.push('inline void ' + cls + '_base::i_NamedEnumerator(const v8::PropertyCallbackInfo<v8::Array>& args)\n{\n v8::Local<v8::Array> vr;\n');
txts.push(` METHOD_NAME("${cls}.${fname}");`);
txts.push(` METHOD_NAME("${cls}[]");`);
txts.push(` METHOD_INSTANCE(${cls}_base);\n PROPERTY_ENTER();\n`);
txts.push(' hr = pInst->_named_enumerator(vr);\n');
txts.push(' METHOD_RETURN1();\n}\n');
if (!fn.readonly) {
txts.push('inline void ' + cls + '_base::i_NamedSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& args)\n{');
txts.push(` METHOD_NAME("${cls}.${fname}");`);
txts.push(` METHOD_NAME("${cls}[]");`);
txts.push(` METHOD_INSTANCE(${cls}_base);\n PROPERTY_ENTER();\n`);
txts.push(' PROPERTY_VAL(' + get_rtype(fn.type) + ');\n exlib::string k;\n GetArgumentValue(isolate, property, k);\n if (class_info().has(k.c_str()))\n return;\n');
if (fn.deprecated)
txts.push(' DEPRECATED_SOON("' + cls + fn.name + '");\n');
txts.push(' hr = pInst->_named_setter(k, v0);\n if (hr == CALL_RETURN_NULL)\n return;\n');
txts.push(' METHOD_VOID();\n}\n');
txts.push('inline void ' + cls + '_base::i_NamedDeleter(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Boolean>& args)\n{\n v8::Local<v8::Boolean> vr;\n');
txts.push(` METHOD_NAME("${cls}.${fname}");`);
txts.push(` METHOD_NAME("${cls}[]");`);
txts.push(` METHOD_INSTANCE(${cls}_base);\n PROPERTY_ENTER();\n`);
txts.push(' exlib::string k;\n GetArgumentValue(isolate, property, k);\n if (class_info().has(k.c_str())) {\n args.GetReturnValue().Set(v8::False(isolate));\n return;\n }\n');
txts.push(' hr = pInst->_named_deleter(k, vr);\n METHOD_RETURN1();\n}\n');
}
} else {
txts.push('inline void ' + cls + '_base::i_IndexedGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& args)\n{');
txts.push(' ' + get_rtype(fn.type) + ' vr;\n');
txts.push(` METHOD_NAME("${cls}.${fname}");`);
txts.push(` METHOD_NAME("${cls}[]");`);
txts.push(` METHOD_INSTANCE(${cls}_base);\n PROPERTY_ENTER();\n`);
if (fn.deprecated)
txts.push(' DEPRECATED_SOON("' + cls + fn.name + '");\n');
@@ -398,7 +398,7 @@ module.exports = function (defs, baseFolder) {
if (!fn.readonly) {
txts.push('inline void ' + cls + '_base::i_IndexedSetter(uint32_t index, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& args)\n{');
txts.push(` METHOD_NAME("${cls}.${fname}");`);
txts.push(` METHOD_NAME("${cls}[]");`);
txts.push(` METHOD_INSTANCE(${cls}_base);\n PROPERTY_ENTER();\n`);
if (fn.deprecated)
txts.push(' DEPRECATED_SOON("' + cls + fn.name + '");\n');

0 comments on commit 83ad511

Please sign in to comment.