Skip to content

Commit ea6d35a

Browse files
committed
Fix harfbuzz build after new clang warning was added. NFC
Followup to #22798
1 parent abd465b commit ea6d35a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/library_stack_trace.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
*/
66

77
var LibraryStackTrace = {
8-
$jsStackTrace: function() {
9-
return new Error().stack.toString();
10-
},
8+
$jsStackTrace: () => new Error().stack.toString(),
119

1210
$getCallstack__deps: ['$jsStackTrace', '$warnOnce'],
1311
$getCallstack__docs: '/** @param {number=} flags */',
14-
$getCallstack: function(flags) {
12+
$getCallstack: (flags) => {
1513
var callstack = jsStackTrace();
1614

1715
// Find the symbols in the callstack that corresponds to the functions that
@@ -99,7 +97,7 @@ var LibraryStackTrace = {
9997
},
10098

10199
emscripten_get_callstack__deps: ['$getCallstack', '$lengthBytesUTF8', '$stringToUTF8'],
102-
emscripten_get_callstack: function(flags, str, maxbytes) {
100+
emscripten_get_callstack: (flags, str, maxbytes) => {
103101
var callstack = getCallstack(flags);
104102
// User can query the required amount of bytes to hold the callstack.
105103
if (!str || maxbytes <= 0) {
@@ -205,7 +203,7 @@ var LibraryStackTrace = {
205203
// must be able to unwind from a PC value that may no longer be on the
206204
// execution stack, and so we are forced to cache the entire call stack.
207205
emscripten_stack_snapshot__deps: ['$convertFrameToPC', '$UNWIND_CACHE', '$saveInUnwindCache', '$jsStackTrace'],
208-
emscripten_stack_snapshot: function() {
206+
emscripten_stack_snapshot: () => {
209207
var callstack = jsStackTrace().split('\n');
210208
if (callstack[0] == 'Error') {
211209
callstack.shift();

tools/ports/harfbuzz.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def create(final):
111111
-fno-exceptions
112112
-O3
113113
-DNDEBUG
114+
-Wno-nontrivial-memaccess
114115
'''.split()
115116

116117
cflags += ['-I' + freetype_include, '-I' + os.path.join(freetype_include, 'config')]

0 commit comments

Comments
 (0)