Skip to content

Commit d75b460

Browse files
authored
Add function signatures for idbstore, html5 and html5_webgl libs (#17214)
1 parent cfcfac8 commit d75b460

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/library_html5.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,6 +2620,7 @@ var LibraryHTML5 = {
26202620
},
26212621
#else
26222622
emscripten_get_canvas_element_size__deps: ['$JSEvents', '$findCanvasEventTarget'],
2623+
emscripten_get_canvas_element_size__sig: 'ippp',
26232624
emscripten_get_canvas_element_size: function(target, width, height) {
26242625
var canvas = findCanvasEventTarget(target);
26252626
if (!canvas) return {{{ cDefine('EMSCRIPTEN_RESULT_UNKNOWN_TARGET') }}};

src/library_html5_webgl.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ var LibraryHtml5WebGL = {
231231
GL.currentContextIsProxied = true;
232232
},
233233
#else
234+
emscripten_webgl_make_context_current__sig: 'ii',
234235
emscripten_webgl_make_context_current: function(contextHandle) {
235236
var success = GL.makeContextCurrent(contextHandle);
236237
return success ? {{{ cDefine('EMSCRIPTEN_RESULT_SUCCESS') }}} : {{{ cDefine('EMSCRIPTEN_RESULT_INVALID_PARAM') }}};

src/library_idbstore.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var LibraryIDBStore = {
1313
$IDBStore:
1414
#include IDBStore.js
1515
,
16-
16+
emscripten_idb_async_load__sig: 'vppppp',
1717
emscripten_idb_async_load: function(db, id, arg, onload, onerror) {
1818
IDBStore.getFile(UTF8ToString(db), UTF8ToString(id), function(error, byteArray) {
1919
if (error) {
@@ -26,6 +26,7 @@ var LibraryIDBStore = {
2626
_free(buffer);
2727
});
2828
},
29+
emscripten_idb_async_store__sig: 'vpppippp',
2930
emscripten_idb_async_store: function(db, id, ptr, num, arg, onstore, onerror) {
3031
// note that we copy the data here, as these are async operatins - changes to HEAPU8 meanwhile should not affect us!
3132
IDBStore.setFile(UTF8ToString(db), UTF8ToString(id), new Uint8Array(HEAPU8.subarray(ptr, ptr+num)), function(error) {
@@ -36,6 +37,7 @@ var LibraryIDBStore = {
3637
if (onstore) {{{ makeDynCall('vi', 'onstore') }}}(arg);
3738
});
3839
},
40+
emscripten_idb_async_delete__sig: 'vppppp',
3941
emscripten_idb_async_delete: function(db, id, arg, ondelete, onerror) {
4042
IDBStore.deleteFile(UTF8ToString(db), UTF8ToString(id), function(error) {
4143
if (error) {
@@ -45,6 +47,7 @@ var LibraryIDBStore = {
4547
if (ondelete) {{{ makeDynCall('vi', 'ondelete') }}}(arg);
4648
});
4749
},
50+
emscripten_idb_async_exists__sig: 'vppppp',
4851
emscripten_idb_async_exists: function(db, id, arg, oncheck, onerror) {
4952
IDBStore.existsFile(UTF8ToString(db), UTF8ToString(id), function(error, exists) {
5053
if (error) {

0 commit comments

Comments
 (0)