[Webkit-unassigned] [Bug 47862] Web Inspector: js executed in the console doesn't trigger strict mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 19 23:58:59 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47862





--- Comment #3 from Pavel Feldman <pfeldman at chromium.org>  2010-10-19 23:58:58 PST ---
(In reply to comment #2)
> (In reply to comment #1)
> > That's the way we wrap it:
> >         if (!isEvalOnCallFrame)
> >             expression = "with (window) {\n" + expression + "\n} ";
> >         expression = "with (window.console._commandLineAPI) {\n" + expression + "\n}";
> 
> Are there any other changes that you make to it?  And where do you actually cause it to be evaluated?  are there any string replacements happening?

There are no other changes, but the ones above are enough to prevent ToT from producing a syntax error:

<script>
with (window) {
(function(){ "use strict"; eval('with({ }) { }') })()
}
</script>

is processed silently.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list