diff --git a/js/src/debugger/Frame.cpp b/js/src/debugger/Frame.cpp index 9b93d3dcbc47..7e3b39e4be60 100644 --- a/js/src/debugger/Frame.cpp +++ b/js/src/debugger/Frame.cpp @@ -861,7 +861,12 @@ static bool EvaluateInEnv(JSContext* cx, Handle env, options.setIsRunOnce(true) .setNoScriptRval(false) .setFileAndLine(filename, lineno) - .setIntroductionType("debugger eval"); + .setIntroductionType("debugger eval") + /* Do not perform the Javascript filename validation security check for + * javascript executions sent through the debugger. Besides making up + * a filename for these codepaths, we must allow arbitrary JS execution + * for the Browser toolbox to function. */ + .setSkipFilenameValidation(true); if (frame && frame.hasScript() && frame.script()->strict()) { options.setForceStrictMode();