Skip to content

Commit c8f02d6

Browse files
committed
Enable strict mode in js
This will make some types of bugs easier to detect and avoid accidental additions of code not working inside Modules, which always use strict mode. Performance measurements show no relevant performance difference between strict and non-strict mode, so this won't cause regressions in this regard.
1 parent 952afbd commit c8f02d6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
BASE_DIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
55
DIST_DIR:=$(BASE_DIR)dist/libraries
66

7-
export LDFLAGS = -O3 -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1
7+
export LDFLAGS = -O3 -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1 -s STRICT_JS=1
88
export CFLAGS = -O3 -s USE_PTHREADS=0
99
export CXXFLAGS = $(CFLAGS)
1010
export PKG_CONFIG_PATH = $(DIST_DIR)/lib/pkgconfig

src/subtitles-octopus.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var SubtitlesOctopus = function (options) {
23
var supportsWebAssembly = false;
34
try {

0 commit comments

Comments
 (0)