Questions tagged [spidermonkey]

SpiderMonkey is Mozilla's JavaScript and WebAssembly Engine. A highly tailored version of which executes JavaScript & WebAssembly in the Firefox web browser.

SpiderMonkey is Mozilla's JavaScript & WebAssembly Engine. A highly tailored and polished-to-fit version of SpiderMonkey executes JavaScript & WebAssembly in the Firefox web browser. SpiderMonkey is also the first JavaScript engine ever made.

This virtual machine (VM) is implemented in C++, Rust and JavaScript and has support for Just-In-Time (JIT) compilation on several major platforms.

Resources


Related tags

318 questions
2
votes
3 answers

building mozilla NSPR using MinGw on windows without VC++

I need to use spidermonkey for my perl javascript engine. For that I need to build spidermonkey with thread-safe libraries. So as I understand I need to first build NSPR and then spidermonkey. So, as I understood from following link…
rpg
  • 1,632
  • 2
  • 18
  • 34
2
votes
1 answer

Is it possible to compile javascript engine(like spidermonkey) and run on Webassembly?

I guess that some problems would be on this process. Do you think that it is safe and stable?
Marco Jo
  • 33
  • 3
2
votes
1 answer

How can I enable references in WebAssembly with SpiderMonkey?

I try to use the experimental AnyRef in WebAssembly with the JavaScript engine SpiderMonkey. I receive the follow error: CompileError: wasm validation error: at offset 40: reference types not enabled I try to enable it with the command line…
Horcrux7
  • 23,758
  • 21
  • 98
  • 156
2
votes
0 answers

Why JIT is not allowed in iOS? Can we enable it?

I am trying to use Spidermonkey and it uses JIT to some extent and that is breaking some functionality.I came to know that Apple does not allow JIT due to some security reasons? Can someone explain what are those possible security reasons? Also is…
Desert Rose
  • 3,376
  • 1
  • 30
  • 36
2
votes
2 answers

Chrome displaying the previous data even after reloading the page

I am working on a single page application. And I have one page which makes a server requests when ever that page is loaded. I made some changes and deployed on the server. But when I am using the live version application, it's not reflecting the…
Lokesh Pandey
  • 1,739
  • 23
  • 50
2
votes
0 answers

How to open a file to save output in JavaScript using spidermonkey engine?

I wanted to export output of a JS programme [in spidermonkey JS engine] to a file, and the only way I was able to do it was using js myfile.js >> output.txt Is there any other way to write output to a file?
acagastya
  • 323
  • 2
  • 14
2
votes
1 answer

handling XML DOM in SpiderMonkey javascript 1.8 - function appendChild(childnode)

I'm trying to write a script (JavaScript) inside a product called Enterprise Architect ver 13.0.1310 (Editor : Sparx Systems). Enterprise Architect is designed to manage UML models. Sparx Systems says that Enterprise Architect has a SpiderMonkey…
2
votes
1 answer

Embedding SpiderMonkey JS

I'm working on a C++ application. I would like to embed SpiderMonkey in the application. I'm working with CMake, but I couldn't get that build. So, in an attempt to reduce complications, I tried the example code on this page. This wouldn't link…
ThetaSinner
  • 399
  • 5
  • 16
2
votes
0 answers

putstr() is not defined in SpiderMonkey

I've installed Spider Monkey in my OS(Ubuntu 16.04 x64). SpiderMonkey is Mozilla's JavaScript engine written in C/C++. It is used in various Mozilla products, including Firefox, and is available under the MPL2. --- Mozilla's Developer Website I…
lbs0912
  • 331
  • 1
  • 3
  • 13
2
votes
1 answer

Why setInterval accepts only 2^31-1 delay values?

According to the specification, long setInterval(Function handler, optional long timeout, any... arguments); setInterval() is supposed to accept long timeout delay. However, on 64bit Linux it behaves like it was a signed 32bit int. I didn't test on…
Michał Šrajer
  • 30,364
  • 7
  • 62
  • 85
2
votes
1 answer

Why do browsers support implicit function properties on objects

var obj = { foo: function() { return "this is foo"; }, bar() { return "this is bar"; } } Executing this in NodeJS leads yields a SyntaxError at bar^( on line 3 - as would be expected. Chrome and Firefox seem to be perfectly happy though,…
cjoy
  • 406
  • 5
  • 14
2
votes
1 answer

SpiderMonkey: Manually Calling a Constructor Function

As we know we create a proxy like this. var proxy = new Proxy(target, handler); I however want to get a new proxy object by simply calling a function var proxy = CreateAProxy(target,handler); basically without using the new keyword. How do i…
gCoder12
  • 1,643
  • 2
  • 10
  • 5
2
votes
0 answers

JS_newObject API crashes, probably Garbage Collector issue

So I am trying to run a code on release 64 platform. I am using spidemonkey 1.8.5 . the following code crashes at line JS_NewObject(). My guess is it is related to GC triggered inside the API. I have tried other APIs that do the same thing, I've…
2
votes
2 answers

How to read the content from a (local) file with SpiderMonkey on the command line?

I want to use SpiderMonkey for driving a test harness (for the in-browser version see here). Now, I tried the following: var defaultFileName = "all.n3"; var reader = new FileReader(); reader.readAsText(defaultFileName); reader.onload =…
Michael Hausenblas
  • 13,162
  • 4
  • 52
  • 66
2
votes
1 answer

Understanding Firefox 32 Garbage Collectioni

I have downloaded the Firefox 32 source code. I have read about the Generational Garbage Collection over here [1][2]. I have also gone through files like js/src/jsgc.h, js/src/jsgc.cpp, js/src/gc/zone.h, js/src/gc/heap.h, js/src/gc/marking.h etc.…
Naman Patel
  • 113
  • 1
  • 7