Skip to content

Commit 594d27d

Browse files
authored
Suppress embind closure compiler warnings (#20166)
1 parent 453e83a commit 594d27d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/embind/embind.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ var LibraryEmbind = {
275275
});
276276
},
277277

278+
_embind_register_bool__docs: '/** @suppress {globalThis} */',
278279
_embind_register_bool__deps: ['$readLatin1String', '$registerType', '$GenericWireTypeSize'],
279280
_embind_register_bool: (rawType, name, trueValue, falseValue) => {
280281
name = readLatin1String(name);
@@ -350,6 +351,7 @@ var LibraryEmbind = {
350351
}
351352
},
352353

354+
_embind_register_integer__docs: '/** @suppress {globalThis} */',
353355
// When converting a number from JS to C++ side, the valid range of the number is
354356
// [minRange, maxRange], inclusive.
355357
_embind_register_integer__deps: [
@@ -464,11 +466,13 @@ var LibraryEmbind = {
464466
});
465467
},
466468

469+
$simpleReadValueFromPointer__docs: '/** @suppress {globalThis} */',
467470
// For types whose wire types are 32-bit pointers.
468471
$simpleReadValueFromPointer: function(pointer) {
469472
return this['fromWireType']({{{ makeGetValue('pointer', '0', 'i32') }}});
470473
},
471474

475+
$readPointer__docs: '/** @suppress {globalThis} */',
472476
$readPointer: function(pointer) {
473477
return this['fromWireType']({{{ makeGetValue('pointer', '0', '*') }}});
474478
},
@@ -1217,6 +1221,7 @@ var LibraryEmbind = {
12171221
});
12181222
},
12191223

1224+
$genericPointerToWireType__docs: '/** @suppress {globalThis} */',
12201225
$genericPointerToWireType__deps: ['$throwBindingError', '$upcastPointer'],
12211226
$genericPointerToWireType: function(destructors, handle) {
12221227
var ptr;
@@ -1292,6 +1297,7 @@ var LibraryEmbind = {
12921297
return ptr;
12931298
},
12941299

1300+
$constNoSmartPtrRawPointerToWireType__docs: '/** @suppress {globalThis} */',
12951301
// If we know a pointer type is not going to have SmartPtr logic in it, we can
12961302
// special-case optimize it a bit (compare to genericPointerToWireType)
12971303
$constNoSmartPtrRawPointerToWireType__deps: ['$throwBindingError', '$upcastPointer'],
@@ -1314,6 +1320,7 @@ var LibraryEmbind = {
13141320
return ptr;
13151321
},
13161322

1323+
$nonConstNoSmartPtrRawPointerToWireType__docs: '/** @suppress {globalThis} */',
13171324
// An optimized version for non-const method accesses - there we must additionally restrict that
13181325
// the pointer is not a const-pointer.
13191326
$nonConstNoSmartPtrRawPointerToWireType__deps: ['$throwBindingError', '$upcastPointer'],
@@ -1410,13 +1417,15 @@ var LibraryEmbind = {
14101417
}
14111418
},
14121419

1420+
$RegisteredPointer_getPointee__docs: '/** @suppress {globalThis} */',
14131421
$RegisteredPointer_getPointee: function(ptr) {
14141422
if (this.rawGetPointee) {
14151423
ptr = this.rawGetPointee(ptr);
14161424
}
14171425
return ptr;
14181426
},
14191427

1428+
$RegisteredPointer_destructor__docs: '/** @suppress {globalThis} */',
14201429
$RegisteredPointer_destructor: function(ptr) {
14211430
if (this.rawDestructor) {
14221431
this.rawDestructor(ptr);
@@ -1429,6 +1438,7 @@ var LibraryEmbind = {
14291438
}
14301439
},
14311440

1441+
$RegisteredPointer_fromWireType__docs: '/** @suppress {globalThis} */',
14321442
$RegisteredPointer_fromWireType__deps: [
14331443
'$downcastPointer', '$registeredPointers',
14341444
'$getInheritedInstance', '$makeClassHandle',
@@ -1621,6 +1631,7 @@ var LibraryEmbind = {
16211631
$ClassHandle: function() {
16221632
},
16231633

1634+
$ClassHandle_isAliasOf__docs: '/** @suppress {globalThis,checkTypes} */',
16241635
$ClassHandle_isAliasOf: function(other) {
16251636
if (!(this instanceof ClassHandle)) {
16261637
return false;
@@ -1656,6 +1667,7 @@ var LibraryEmbind = {
16561667
throwBindingError(getInstanceTypeName(obj) + ' instance already deleted');
16571668
},
16581669

1670+
$ClassHandle_clone__docs: '/** @suppress {globalThis} */',
16591671
$ClassHandle_clone__deps: ['$shallowCopyInternalPointer', '$throwInstanceAlreadyDeleted', '$attachFinalizer'],
16601672
$ClassHandle_clone: function() {
16611673
if (!this.$$.ptr) {
@@ -1678,6 +1690,7 @@ var LibraryEmbind = {
16781690
}
16791691
},
16801692

1693+
$ClassHandle_delete__docs: '/** @suppress {globalThis} */',
16811694
$ClassHandle_delete__deps: ['$releaseClassHandle', '$throwBindingError',
16821695
'$detachFinalizer', '$throwInstanceAlreadyDeleted'],
16831696
$ClassHandle_delete: function() {
@@ -1700,10 +1713,12 @@ var LibraryEmbind = {
17001713

17011714
$deletionQueue: [],
17021715

1716+
$ClassHandle_isDeleted__docs: '/** @suppress {globalThis} */',
17031717
$ClassHandle_isDeleted: function() {
17041718
return !this.$$.ptr;
17051719
},
17061720

1721+
$ClassHandle_deleteLater__docs: '/** @suppress {globalThis} */',
17071722
$ClassHandle_deleteLater__deps: [
17081723
'$delayFunction', '$deletionQueue', '$flushPendingDeletes'],
17091724
$ClassHandle_deleteLater: function() {
@@ -2365,6 +2380,7 @@ var LibraryEmbind = {
23652380
});
23662381
},
23672382

2383+
_embind_register_enum__docs: '/** @suppress {globalThis} */',
23682384
_embind_register_enum__deps: ['$exposePublicSymbol', '$enumReadValueFromPointer',
23692385
'$readLatin1String', '$registerType'],
23702386
_embind_register_enum: (rawType, name, size, isSigned) => {

0 commit comments

Comments
 (0)