File: 1001_avoid_evals.patch

package info (click to toggle)
node-async 0.8.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 460 kB
  • sloc: javascript: 4,776; makefile: 27; sh: 4
file content (17 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Replace ancient process.binding('evals') with require('vm')
Author: Jonas Smedegaard <dr@jones.dk>
Copyright: GPL-3+
Last-Update: 2018-01-07
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -1806,7 +1806,7 @@
             if(err) return test.done();
 
             // Script -> NodeScript in node v0.6.x
-            var Script = process.binding('evals').Script || process.binding('evals').NodeScript;
+            var Script = require('vm').Script || require('vm').NodeScript;
 
             var s = new Script(content, filename);
             var s2 = new Script(