Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between Firefox's Javascript engine and Chrome's V8?

I have found some articles saying that FF's JavaScript engine partially adopted Chrome's V8 features, or even that some of its source code is from V8!

If so, can I say that replacing the JavaScript engine in Firefox with Chrome's V8 is easy as pie?

If not, what's the difference?

like image 572
Spry Mickael Avatar asked Apr 01 '12 07:04

Spry Mickael


1 Answers

The only V8 source code that Firefox uses is things that were factored out into separate libraries (e.g. some of the numeric conversion code), as far as I know.

The reasons to not adopt V8 wholesale are that it has certain bugs that SpiderMonkey (the JS engine in Firefox) doesn't have, is missing some features that SpiderMonkey has, and Firefox would not be able to introduce new features for JS until the V8 folks got around to it.

like image 87
Boris Zbarsky Avatar answered Sep 27 '22 19:09

Boris Zbarsky