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

Unified Diff: compiled/debug.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Almost complete implementation, missing CSS property filters Created Jan. 20, 2016, 12:04 p.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/api.cpp ('k') | compiled/shell.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/debug.h
===================================================================
new file mode 100644
--- /dev/null
+++ b/compiled/debug.h
@@ -0,0 +1,28 @@
+#ifndef ADBLOCK_PLUS_DEBUG_H
+#define ADBLOCK_PLUS_DEBUG_H
+
+#include <string>
+
+#include <emscripten.h>
+
+struct console_type
+{
+ static void log(const std::u16string& str)
+ {
+ EM_ASM_ARGS(console.log(getStringData($0)), &str);
+ }
+
+ static void log(int i)
+ {
+ EM_ASM_ARGS(console.log($0), i);
+ }
+
+ static void log(void* ptr)
+ {
+ EM_ASM_ARGS(console.log($0), ptr);
+ }
+};
+
+static console_type console;
+
+#endif
« no previous file with comments | « compiled/api.cpp ('k') | compiled/shell.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld