Skip to content

Commit 400165b

Browse files
authored
Add missing dependency to embind's getTypeName. NFC (#17555)
We have had reports of `__getTypeName` being undefined at runtime which should not be possible. Add this explicit dependency so that we fail at link time if this symbol (defined in `bind.cpp`) is missing.
1 parent 8c4557e commit 400165b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/embind/embind.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/*global FUNCTION_TABLE, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64*/
1111
/*global readLatin1String*/
1212
/*global Emval, emval_handle_array, __emval_decref*/
13-
/*global ___getTypeName*/
1413
/*jslint sub:true*/ /* The symbols 'fromWireType' and 'toWireType' must be accessed via array notation to be closure-safe since craftInvokerFunction crafts functions as strings that can't be closured. */
1514

1615
// -- jshint doesn't understand library syntax, so we need to specifically tell it about the symbols we define
@@ -394,7 +393,7 @@ var LibraryEmbind = {
394393
return ret;
395394
},
396395

397-
$getTypeName__deps: ['$readLatin1String'],
396+
$getTypeName__deps: ['$readLatin1String', '__getTypeName'],
398397
$getTypeName: function(type) {
399398
var ptr = ___getTypeName(type);
400399
var rv = readLatin1String(ptr);

0 commit comments

Comments
 (0)