mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Adding a utility function to detect the Rhino shell.
This commit is contained in:
parent
5c2244951b
commit
23d222431f
@ -51,6 +51,22 @@ function inSection(x)
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Some tests need to know if we are in Rhino as opposed to SpiderMonkey
|
||||
*/
|
||||
function inRhino()
|
||||
{
|
||||
try
|
||||
{
|
||||
java;
|
||||
return true;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Report a failure in the 'accepted' manner
|
||||
*/
|
||||
|
@ -51,6 +51,22 @@ function inSection(x)
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Some tests need to know if we are in Rhino as opposed to SpiderMonkey
|
||||
*/
|
||||
function inRhino()
|
||||
{
|
||||
try
|
||||
{
|
||||
java;
|
||||
return true;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Report a failure in the 'accepted' manner
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user