File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -7669,6 +7669,7 @@ def test_embind_no_rtti_followed_by_rtti(self):
76697669 def test_webidl (self , mode , allow_memory_growth ):
76707670 self .uses_es6 = True
76717671 self .set_setting ('WASM_ASYNC_COMPILATION' , 0 )
7672+ self .set_setting ('STRICT' )
76727673 if self .maybe_closure ():
76737674 # avoid closure minified names competing with our test code in the global name space
76747675 self .set_setting ('MODULARIZE' )
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ try {
239239} catch ( e ) { }
240240
241241try {
242- s = new TheModule . StringUser ( 'abc' , 1 ) ;
242+ var s = new TheModule . StringUser ( 'abc' , 1 ) ;
243243 s . Print ( 123 , null ) ; // Expects a string or a wrapped pointer
244244} catch ( e ) { }
245245
Original file line number Diff line number Diff line change @@ -133,6 +133,15 @@ def build_constructor(name):
133133mid_js += build_constructor ('WrapperObject' )
134134
135135mid_js += ['''
136+ /*
137+ * For now, the webidl-generated code unconditionally depends on the `assert` function,
138+ * but there are certain build modes where emscripten does not define this.
139+ * TODO(sbc): Make the usage of assert conditional.
140+ */
141+ if (typeof assert == "undefined") {
142+ assert = (cond) => {}
143+ }
144+
136145/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant)
137146 @param {*=} __class__ */
138147function getCache(__class__) {
You can’t perform that action at this time.
0 commit comments