Skip to content
Permalink
Browse files
2011-05-23 Yury Semikhatsky <yurys@chromium.org>
        Reviewed by Adam Barth.

        Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
        https://bugs.webkit.org/show_bug.cgi?id=61194

        * inspector/console/console-eval-syntax-error-expected.txt: Added.
        * inspector/console/console-eval-syntax-error.html: Added.
        * platform/chromium/inspector/console/console-eval-syntax-error-expected.txt: Added.
2011-05-23  Yury Semikhatsky  <yurys@chromium.org>

        Reviewed by Adam Barth.

        Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
        https://bugs.webkit.org/show_bug.cgi?id=61194

        Test: inspector/console/console-eval-syntax-error.html

        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
        (WebCore::V8InjectedScriptHost::evaluateCallback): return immediately in case of syntax error

Canonical link: https://commits.webkit.org/76725@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
yury-s committed May 24, 2011
1 parent 1fb7dbb commit 6931a0107c8c93077d2b0d5d33a1f5c8915c1bb0
@@ -1,3 +1,14 @@
2011-05-23 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Adam Barth.

Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
https://bugs.webkit.org/show_bug.cgi?id=61194

* inspector/console/console-eval-syntax-error-expected.txt: Added.
* inspector/console/console-eval-syntax-error.html: Added.
* platform/chromium/inspector/console/console-eval-syntax-error-expected.txt: Added.

2011-05-24 Gabor Loki <loki@webkit.org>

Rubber-stamped by Csaba Osztrogonác.
@@ -0,0 +1,5 @@
Tests that evaluating an expression with a syntax error in the console won't crash the browser. Bug 61194.

foo().
Error

@@ -0,0 +1,25 @@
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/console-test.js"></script>
<script>
function test()
{
InspectorTest.evaluateInConsole("foo().", step1);

function step1()
{
InspectorTest.dumpConsoleMessages();
InspectorTest.completeTest();
}
}

</script>
</head>
<body onload="runTest()">
<p>
Tests that evaluating an expression with a syntax error in the console won't crash the browser.
<a href="https://bugs.webkit.org/show_bug.cgi?id=61194">Bug 61194.</a>
</p>
</body>
</html>
@@ -0,0 +1,5 @@
Tests that evaluating an expression with a syntax error in the console won't crash the browser. Bug 61194.

foo().
SyntaxError

@@ -1,3 +1,15 @@
2011-05-23 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Adam Barth.

Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
https://bugs.webkit.org/show_bug.cgi?id=61194

Test: inspector/console/console-eval-syntax-error.html

* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::evaluateCallback): return immediately in case of syntax error

2011-04-13 Steve Block <steveblock@google.com>

Reviewed by Eric Seidel.
@@ -76,6 +76,8 @@ v8::Handle<v8::Value> V8InjectedScriptHost::evaluateCallback(const v8::Arguments
return v8::ThrowException(v8::Exception::Error(v8::String::New("The argument must be a string.")));

v8::Handle<v8::Script> script = v8::Script::Compile(expression);
if (script.IsEmpty()) // Return immediately in case of exception to let the caller handle it.
return v8::Handle<v8::Value>();
return script->Run();
}

0 comments on commit 6931a01

Please sign in to comment.