Skip to content

Commit

Permalink
chore: run arm tests unsandboxed again
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and codebytere committed Jul 14, 2020
1 parent 0618721 commit bec5073
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ Only one ESM loader can be registered per isolate, in renderer processes this sh
This can be attempted to be upstreamed as a new option --disable-esm-loader or something similar.

diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index b4a0f71af5853f427a10449b52509052fbe3facd..06297a4c258e2f0b715da35f855c788d776fc437 100644
index b4a0f71af5853f427a10449b52509052fbe3facd..ba5b0b6e51bcddbc5b9dd9c31231585d61b131a0 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -408,6 +408,8 @@ function initializeCJSLoader() {
}

function initializeESMLoader() {
+ // Do not hook the ESM loader in renderer processes as it overrides blinks loader
+ if (process.type !== 'browser') return;
@@ -411,6 +411,9 @@ function initializeESMLoader() {
// Create this WeakMap in js-land because V8 has no C++ API for WeakMap.
internalBinding('module_wrap').callbackMap = new SafeWeakMap();

+ // Do not hook the ESM loader in renderer processes as it overrides blinks loader
+ if (typeof process.type === 'string' && process.type !== 'browser') return;
+
const {
setImportModuleDynamicallyCallback,
setInitializeImportMetaObjectCallback
3 changes: 0 additions & 3 deletions vsts-arm-test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ steps:
sudo gdk-pixbuf-query-loaders --update-cache
cd src
export ELECTRON_OUT_DIR=Default
unset ELECTRON_DISABLE_SANDBOX
sudo chown root out/Default/chrome-sandbox
sudo chmod 4755 out/Default/chrome-sandbox
(cd electron && node script/yarn test -- --enable-logging)
displayName: 'Run Electron tests'
timeoutInMinutes: 20
Expand Down
2 changes: 1 addition & 1 deletion vsts-arm32v7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resources:
containers:
- container: arm32v7-test-container
image: electronjs/build:arm32v7-697b894f36d127155e020f4e8ad4b2e5f6a09613
options: --shm-size 128m --cap-add SYS_ADMIN
options: --shm-size 128m

jobs:
- job: Test_Arm32v7
Expand Down
2 changes: 1 addition & 1 deletion vsts-arm64v8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resources:
containers:
- container: arm64v8-test-container
image: electronjs/build:arm64v8-697b894f36d127155e020f4e8ad4b2e5f6a09613
options: --shm-size 128m --cap-add SYS_ADMIN
options: --shm-size 128m

jobs:
- job: Test_Arm64
Expand Down

0 comments on commit bec5073

Please sign in to comment.