New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

isolated-vm

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isolated-vm - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

2

package.json
{
"name": "isolated-vm",
"version": "1.3.1",
"version": "1.4.0",
"description": "Access to multiple isolates",

@@ -5,0 +5,0 @@ "main": "isolated-vm.js",

@@ -141,2 +141,11 @@ [![npm version](https://img.shields.io/npm/v/isolated-vm.svg)](https://www.npmjs.com/package/isolated-vm) [![isc license](https://img.shields.io/npm/l/isolated-vm.svg)](https://github.com/laverdet/isolated-vm/blob/master/LICENSE) [![travis build](https://img.shields.io/travis/laverdet/isolated-vm/master.svg)](https://travis-ci.org/laverdet/isolated-vm)

##### `isolate.referenceCount` *[number]*
Returns the total count of active `Reference` instances that belong to this isolate. Note that in
certain cases many `Reference` instances in JavaScript will point to the same underlying reference
handle, in which case this number will only reflect the underlying reference handle. This happens
when you transfer a `Reference` instance via some method which accepts transferable values. This
will also include underlying reference handles created by isolated-vm like `Script` or `Context`
objects.
### Class: `Context` *[transferable]*

@@ -143,0 +152,0 @@ A context is a sandboxed execution environment within an isolate. Each context contains its own

@@ -29,3 +29,3 @@ 'use strict';

let i2 = err.stack.indexOf('env2');
let i3 = err.stack.indexOf('Module');
let i3 = err.stack.indexOf('exception-info.js');
if (sync === true) {

@@ -68,1 +68,25 @@ if (i0 == -1 || i1 == -1 || i2 == -1 || i3 == -1 || i0 > i1 || i1 > i2 || i2 > i3) {

});
// Try async recursive
{
let isolate = new ivm.Isolate({ memoryLimit: 16});
let context = isolate.createContextSync();
context.global.setSync('context', context);
context.global.setSync('isolate', isolate);
isolate.compileScriptSync('new '+function() {
let script = isolate.compileScriptSync(`
function infinite() {
for(;;);
}
infinite();
`);
script.runSync(context, { timeout: 10 });
return 'arst';
}).run(context).then(_ => console.log('recursive did not throw')).catch(function(err) {
if (!/infinite/.test(err.stack)) {
console.log('no recursive stack');
}
});
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc