Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Unified Diff: test/cctest/test-api.cc

Issue 7046002: Remove execScript from V8. No longer present i neither Firefox nor Safari. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/execScript-case-insensitive.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index e9d77eca86c63f2ac99a53cb2adf5aa3328836b9..1121210760cdb39b89e72224d6cb02f8fe59ebde 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -14431,8 +14431,6 @@ void CheckCodeGenerationAllowed() {
CHECK_EQ(42, result->Int32Value());
result = CompileRun("(function(e) { return e('42'); })(eval)");
CHECK_EQ(42, result->Int32Value());
- result = CompileRun("execScript('42')");
- CHECK(!result.IsEmpty());
result = CompileRun("var f = new Function('return 42'); f()");
CHECK_EQ(42, result->Int32Value());
}
@@ -14451,11 +14449,6 @@ void CheckCodeGenerationDisallowed() {
CHECK(try_catch.HasCaught());
try_catch.Reset();
- result = CompileRun("execScript('42')");
- CHECK(result.IsEmpty());
- CHECK(try_catch.HasCaught());
- try_catch.Reset();
-
result = CompileRun("var f = new Function('return 42'); f()");
CHECK(result.IsEmpty());
CHECK(try_catch.HasCaught());
@@ -14478,10 +14471,10 @@ THREADED_TEST(AllowCodeGenFromStrings) {
v8::HandleScope scope;
LocalContext context;
- // eval, execScript and the Function constructor allowed by default.
+ // eval and the Function constructor allowed by default.
CheckCodeGenerationAllowed();
- // Disallow eval, execScript and the Function constructor.
+ // Disallow eval and the Function constructor.
context->AllowCodeGenerationFromStrings(false);
CheckCodeGenerationDisallowed();
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/execScript-case-insensitive.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698