Bug 894854: env var disabling censoring of self-hosted script frames (r=till)

It is only aenabled for debug builds.  The env var is: MOZ_SHOW_ALL_JS_FRAMES
This commit is contained in:
Felix S. Klock II 2013-07-17 09:58:00 +02:00
parent e759c0e570
commit 404372d3dd
2 changed files with 19 additions and 2 deletions

View File

@ -1220,6 +1220,14 @@ ScriptFrameIter::frameSlotValue(size_t index) const
# pragma optimize("", on)
#endif
#ifdef DEBUG
/* static */
bool NonBuiltinScriptFrameIter::includeSelfhostedFrames() {
static char* env = getenv("MOZ_SHOW_ALL_JS_FRAMES");
return (bool)env;
}
#endif
/*****************************************************************************/
JSObject *

View File

@ -1540,9 +1540,18 @@ class ScriptFrameIter
/* A filtering of the ScriptFrameIter to only stop at non-self-hosted scripts. */
class NonBuiltinScriptFrameIter : public ScriptFrameIter
{
#ifdef DEBUG
static bool includeSelfhostedFrames();
#else
static bool includeSelfhostedFrames() {
return false;
}
#endif
void settle() {
while (!done() && script()->selfHosted)
ScriptFrameIter::operator++();
if (!includeSelfhostedFrames())
while (!done() && script()->selfHosted)
ScriptFrameIter::operator++();
}
public: