Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/bindings.ipp

Issue 29385742: Issue 4127 - [emscripten] Convert subscription classes to C++ - Part 2 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Use iterators syntax Created April 6, 2017, 8:05 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/bindings.cpp ('k') | compiled/filter/Filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/bindings.ipp
===================================================================
--- a/compiled/bindings.ipp
+++ b/compiled/bindings.ipp
@@ -454,16 +454,18 @@ namespace bindings_internal
result += " var type = HEAP32[result + " + std::to_string(offset)+ " >> 2];\n";
result += " if (type in " + cls.name + "_mapping)\n";
result += " result = new (exports[" + cls.name + "_mapping[type]])(result);\n";
result += " else\n";
result += " throw new Error('Unexpected " + cls.name + " type: ' + type);\n";
}
result += " }\n";
+ result += " else\n";
+ result += " result = null;\n";
return result;
}
else
throw std::runtime_error("Unexpected return type for " + std::string(call.name));
}
const std::string wrapCall(const FunctionInfo& call)
{
« no previous file with comments | « compiled/bindings.cpp ('k') | compiled/filter/Filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld