Skip to content

Commit c9ef135

Browse files
authored
Changes corresponding to the changes in the lib-wasm submodule (EFForg#18117)
1 parent 158dd36 commit c9ef135

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
url = https://git.torproject.org/translation.git
44
branch = https_everywhere
55

6-
[submodule "https-everywhere-lib"]
7-
path = https-everywhere-lib
8-
url = https://github.com/EFForg/https-everywhere-lib.git
6+
[submodule "lib-wasm"]
7+
path = lib-wasm
8+
url = https://github.com/EFForg/https-everywhere-lib-wasm.git

chromium/background-scripts/rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ RuleSets.prototype = {
222222
this.store = store;
223223
this.ruleActiveStates = await this.store.get_promise('ruleActiveStates', {});
224224
try {
225-
this.wasm_rs = wasm.RuleSets.new();
225+
this.wasm_rs = wasm.JsRuleSets.new();
226226
} catch(e) {
227227
util.log(util.WARN, 'Falling back to pure JS implementation: ' + e);
228228
}

chromium/background-scripts/wasm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
(function(exports) {
44

55
const util = require('./util'),
6-
{ RuleSets } = wasm_bindgen;
6+
{ JsRuleSets } = wasm_bindgen;
77

88
async function initialize() {
99
try {
10-
await wasm_bindgen(chrome.runtime.getURL('wasm/https_everywhere_lib_bg.wasm'));
10+
await wasm_bindgen(chrome.runtime.getURL('wasm/https_everywhere_lib_wasm_bg.wasm'));
1111
} catch(e) {
1212
util.log(util.WARN, 'The wasm library has not loaded correctly: ' + e);
1313
}
@@ -19,7 +19,7 @@ function is_enabled() {
1919

2020
Object.assign(exports, {
2121
initialize,
22-
RuleSets,
22+
JsRuleSets,
2323
is_enabled,
2424
});
2525

chromium/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": [
1212
"background-scripts/bootstrap.js",
1313
"background-scripts/util.js",
14-
"wasm/https_everywhere_lib.js",
14+
"wasm/https_everywhere_lib_wasm.js",
1515
"background-scripts/wasm.js",
1616
"background-scripts/update_channels.js",
1717
"background-scripts/update.js",

chromium/test/rules_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const text_encoding = require('text-encoding');
44
global.TextDecoder = text_encoding.TextDecoder;
55
global.TextEncoder = text_encoding.TextEncoder;
66
global.self = global;
7-
require("../../https-everywhere-lib/pkg/https_everywhere_lib.js");
7+
require("../../lib-wasm/pkg/https_everywhere_lib_wasm.js");
88

99
const assert = require('chai').assert,
1010
rules = require('../background-scripts/rules');

https-everywhere-lib

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib-wasm

Submodule lib-wasm added at a616064

make.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ do_not_ship="*.py *.xml"
110110
rm -f $do_not_ship
111111

112112
mkdir wasm
113-
cp ../../https-everywhere-lib/pkg/*.wasm wasm
114-
cp ../../https-everywhere-lib/pkg/*.js wasm
113+
cp ../../lib-wasm/pkg/*.wasm wasm
114+
cp ../../lib-wasm/pkg/*.js wasm
115115

116116
cd ../..
117117

0 commit comments

Comments
 (0)