Skip to content

Commit c620ff9

Browse files
committed
Enable strict mode in js
This will make some types of bugs easier to detect and supposedly some js engines can take advantage of more optimised paths with strict mode enabled improving performance. Some very crude test show no significant differnce exceeding run-to-run variance.
1 parent 18a53fd commit c620ff9

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 = -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1
7+
export LDFLAGS = -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)