Changeset 14642 for trunk/FACT++/src/InterpreterV8.cc
- Timestamp:
- 11/17/12 16:03:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/InterpreterV8.cc
r14641 r14642 1118 1118 Handle<Value> InterpreterV8::FuncSubscription(const Arguments &args) 1119 1119 { 1120 if (!args.IsConstructCall())1121 return ThrowException(String::New("Subscription must be calles as constructor."));1122 1123 1120 if (args.Length()!=1) 1124 1121 return ThrowException(String::New("Number of arguments must be exactly 1.")); … … 1129 1126 const String::Utf8Value str(args[0]); 1130 1127 1131 const auto it = fReverseMap.find(*str); 1132 if (it!=fReverseMap.end()) 1133 return it->second; 1128 if (!args.IsConstructCall()) 1129 { 1130 const auto it = fReverseMap.find(*str); 1131 if (it!=fReverseMap.end()) 1132 return it->second; 1133 1134 return Undefined(); 1135 } 1134 1136 1135 1137 void *ptr = JsSubscribe(*str); … … 1148 1150 fReverseMap[*str] = Persistent<Object>::New(This); 1149 1151 1150 return Undefined(); //handle_scope.Close(obj);1152 return Undefined(); 1151 1153 1152 1154 // Persistent<Object> p = Persistent<Object>::New(obj->NewInstance());
Note:
See TracChangeset
for help on using the changeset viewer.