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

Unified Diff: compiled/bindings/runtime_utils.cpp

Issue 29425555: Issue 5201 - [emscripten] Replace EM_ASM calls by a custom JavaScript library (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Abstracted away all Emscripten dependencies Created May 3, 2017, 11:54 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/runtime.h ('k') | compiled/debug.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/bindings/runtime_utils.cpp
===================================================================
--- a/compiled/bindings/runtime_utils.cpp
+++ b/compiled/bindings/runtime_utils.cpp
@@ -1,39 +1,38 @@
-#include <emscripten.h>
-
+#include "runtime.h"
#include "../intrusive_ptr.h"
#include "../String.h"
extern "C"
{
- void EMSCRIPTEN_KEEPALIVE InitString(DependentString* str,
+ void BINDINGS_EXPORTED InitString(DependentString* str,
String::value_type* data, String::size_type len)
{
// String is already allocated on stack, we merely need to call
// constructor.
new (str) DependentString(data, len);
}
- void EMSCRIPTEN_KEEPALIVE DestroyString(OwnedString* str)
+ void BINDINGS_EXPORTED DestroyString(OwnedString* str)
{
// Stack memory will be freed automatically, we need to call
// destructor explicitly however.
str->~OwnedString();
}
- String::size_type EMSCRIPTEN_KEEPALIVE GetStringLength(
+ String::size_type BINDINGS_EXPORTED GetStringLength(
const String& str)
{
return str.length();
}
- const String::value_type* EMSCRIPTEN_KEEPALIVE GetStringData(
+ const String::value_type* BINDINGS_EXPORTED GetStringData(
const String& str)
{
return str.data();
}
- void EMSCRIPTEN_KEEPALIVE ReleaseRef(ref_counted* ptr)
+ void BINDINGS_EXPORTED ReleaseRef(ref_counted* ptr)
{
ptr->ReleaseRef();
}
}
« no previous file with comments | « compiled/bindings/runtime.h ('k') | compiled/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld