@@ -763,7 +763,7 @@ var LibraryEmbind = {
763
763
// TODO: Remove this completely once all function invokers are being dynamically generated.
764
764
var needsDestructorStack = usesDestructorStack ( argTypes ) ;
765
765
766
- var returns = ( argTypes [ 0 ] . name !== " void" ) ;
766
+ var returns = ( argTypes [ 0 ] . name !== ' void' ) ;
767
767
768
768
var expectedArgCount = argCount - 2 ;
769
769
#if ASSERTIONS
@@ -842,7 +842,8 @@ var LibraryEmbind = {
842
842
closureArgs . push ( Asyncify ) ;
843
843
#endif
844
844
if ( ! needsDestructorStack ) {
845
- for ( var i = isClassMethodFunc ?1 :2 ; i < argTypes . length ; ++ i ) { // Skip return value at index 0 - it's not deleted here. Also skip class type if not a method.
845
+ // Skip return value at index 0 - it's not deleted here. Also skip class type if not a method.
846
+ for ( var i = isClassMethodFunc ?1 :2 ; i < argTypes . length ; ++ i ) {
846
847
if ( argTypes [ i ] . destructorFunction !== null ) {
847
848
closureArgs . push ( argTypes [ i ] . destructorFunction ) ;
848
849
}
@@ -901,7 +902,7 @@ var LibraryEmbind = {
901
902
}
902
903
903
904
var fp = makeDynCaller ( ) ;
904
- if ( typeof fp != " function" ) {
905
+ if ( typeof fp != ' function' ) {
905
906
throwBindingError ( `unknown function pointer with signature ${ signature } : ${ rawFunction } ` ) ;
906
907
}
907
908
return fp ;
@@ -1632,7 +1633,7 @@ var LibraryEmbind = {
1632
1633
// Support `using ...` from https://github.com/tc39/proposal-explicit-resource-management.
1633
1634
const symbolDispose = Symbol . dispose ;
1634
1635
if ( symbolDispose ) {
1635
- proto [ symbolDispose ] = proto [ " delete" ] ;
1636
+ proto [ symbolDispose ] = proto [ ' delete' ] ;
1636
1637
}
1637
1638
} ,
1638
1639
@@ -1753,10 +1754,10 @@ var LibraryEmbind = {
1753
1754
1754
1755
var constructor = createNamedFunction ( name , function ( ...args ) {
1755
1756
if ( Object . getPrototypeOf ( this ) !== instancePrototype ) {
1756
- throw new BindingError ( " Use 'new' to construct " + name ) ;
1757
+ throw new BindingError ( ` Use 'new' to construct ${ name } ` ) ;
1757
1758
}
1758
1759
if ( undefined === registeredClass . constructor_body ) {
1759
- throw new BindingError ( name + " has no accessible constructor" ) ;
1760
+ throw new BindingError ( ` ${ name } has no accessible constructor` ) ;
1760
1761
}
1761
1762
var body = registeredClass . constructor_body [ args . length ] ;
1762
1763
if ( undefined === body ) {
@@ -2069,7 +2070,7 @@ var LibraryEmbind = {
2069
2070
throwUnboundTypeError ( `Cannot call ${ humanName } due to unbound types` , rawArgTypes ) ;
2070
2071
}
2071
2072
2072
- if ( methodName . startsWith ( "@@" ) ) {
2073
+ if ( methodName . startsWith ( '@@' ) ) {
2073
2074
methodName = Symbol [ methodName . substring ( 2 ) ] ;
2074
2075
}
2075
2076
@@ -2202,20 +2203,20 @@ var LibraryEmbind = {
2202
2203
Object . defineProperty ( this , '__parent' , {
2203
2204
value : wrapperPrototype
2204
2205
} ) ;
2205
- this [ " __construct" ] ( ...args ) ;
2206
+ this [ ' __construct' ] ( ...args ) ;
2206
2207
} ) ;
2207
2208
2208
2209
// It's a little nasty that we're modifying the wrapper prototype here.
2209
2210
2210
- wrapperPrototype [ " __construct" ] = function __construct ( ...args ) {
2211
+ wrapperPrototype [ ' __construct' ] = function __construct ( ...args ) {
2211
2212
if ( this === wrapperPrototype ) {
2212
2213
throwBindingError ( "Pass correct 'this' to __construct" ) ;
2213
2214
}
2214
2215
2215
- var inner = baseConstructor [ " implement" ] ( this , ...args ) ;
2216
+ var inner = baseConstructor [ ' implement' ] ( this , ...args ) ;
2216
2217
detachFinalizer ( inner ) ;
2217
2218
var $$ = inner . $$ ;
2218
- inner [ " notifyOnDestruction" ] ( ) ;
2219
+ inner [ ' notifyOnDestruction' ] ( ) ;
2219
2220
$$ . preservePointerOnDelete = true ;
2220
2221
Object . defineProperties ( this , { $$ : {
2221
2222
value : $$
@@ -2224,7 +2225,7 @@ var LibraryEmbind = {
2224
2225
registerInheritedInstance ( registeredClass , $$ . ptr , this ) ;
2225
2226
} ;
2226
2227
2227
- wrapperPrototype [ " __destruct" ] = function __destruct ( ) {
2228
+ wrapperPrototype [ ' __destruct' ] = function __destruct ( ) {
2228
2229
if ( this === wrapperPrototype ) {
2229
2230
throwBindingError ( "Pass correct 'this' to __destruct" ) ;
2230
2231
}
0 commit comments