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

Unified Diff: test/mjsunit/new-function.js

Issue 12613007: Harden Function()'s parsing of function literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. Created 7 years, 9 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/regress/regress-2470.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/new-function.js
diff --git a/test/mjsunit/new-function.js b/test/mjsunit/new-function.js
index 9e8cc277683cde0f4c22333b0e27cda1a30ad326..794bd765e96d16d13a1cf42c338be6d20174ccdd 100644
--- a/test/mjsunit/new-function.js
+++ b/test/mjsunit/new-function.js
@@ -25,10 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-var x;
+var x = 0;
try {
Function("}), x = this, (function() {");
} catch(e) {
print("Caught " + e);
}
-assertTrue(x == "[object global]");
+assertTrue(x === 0);
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/regress/regress-2470.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698