Difference between revisions of "Mozilla.dev.tech.js-engine"

From CDOT Wiki
Jump to: navigation, search
Line 22: Line 22:
== FAQ ==
== FAQ ==
[http://developer.mozilla.org/en/docs/Newsgroup_summaries:mozilla-dev-tech-js-engine:JS-ENGINE_FAQ| JS-ENGINE]
=== [news://news.mozilla.org:119/1144428827.881876.275810@u72g2000cwu.googlegroups.com What is the performance between Rhino JS and native Java] ===
Rhino JS is significantly slower in run-time than native Java. Even when Rhino is pre-compiled with high optimization, it still is still no match for a compiled Java program.
=== [http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_frm/thread/3e840becb09acccb How long are private pointers? ] ===
2-byte aligned check the JSVAL macros at the top of [http://lxr.mozilla.org/seamonkey/source/js/src/jsapi.h#71 jsapi.h ]
=== [http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_frm/thread/9a2c9872a3e5c94e Can I call functions in Mozilla extensions from web page?] ===
No, accessing anything in the web page's script may lead to security problems.
=== [http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_frm/thread/c59a6b91bd072c1e Newly created threads in JS from MOZILLA_1_8_BRANCH causes to hang in Windows] ===
This [https://bugzilla.mozilla.org/show_bug.cgi?id=351602 Patch] should fix the problem.
After that, recompile JS and define JS_USE_ONLY_NSPR_LOCKS in the build.
=== [http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_frm/thread/ea228a98a26b2d73 How to determine Rhino version programatically?] ===
You can call getImplementationVersion() on a Context instance and it gives you a string
eg. Rhino 1.6 release 2 2005 09 19
=== [http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_frm/thread/e63503323499ba10 Can an embedded SpiderMonkey JS Engine use DOMParser extension of Mozilla?] ===
DOMParser is not part of JS but part of Mozilla browser which makes it available to script in the browser using XPConnect. An alternative would be to use built-in E4X.

Revision as of 12:28, 15 October 2006