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

Side by Side Diff: test/cctest/test-api.cc

Issue 174136: Fix a test that test out of memory situations. On the 64-bit port the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
2836 last_location = NULL; 2836 last_location = NULL;
2837 v8::ExtensionConfiguration config(1, bDeps); 2837 v8::ExtensionConfiguration config(1, bDeps);
2838 v8::Handle<Context> context = Context::New(&config); 2838 v8::Handle<Context> context = Context::New(&config);
2839 CHECK(context.IsEmpty()); 2839 CHECK(context.IsEmpty());
2840 CHECK_NE(last_location, NULL); 2840 CHECK_NE(last_location, NULL);
2841 } 2841 }
2842 2842
2843 2843
2844 static const char* js_code_causing_huge_string_flattening = 2844 static const char* js_code_causing_huge_string_flattening =
2845 "var str = 'X';" 2845 "var str = 'X';"
2846 "for (var i = 0; i < 29; i++) {" 2846 "for (var i = 0; i < 30; i++) {"
2847 " str = str + str;" 2847 " str = str + str;"
2848 "}" 2848 "}"
2849 "str.match(/X/);"; 2849 "str.match(/X/);";
2850 2850
2851 2851
2852 void OOMCallback(const char* location, const char* message) { 2852 void OOMCallback(const char* location, const char* message) {
2853 exit(0); 2853 exit(0);
2854 } 2854 }
2855 2855
2856 2856
(...skipping 4931 matching lines...) Expand 10 before | Expand all | Expand 10 after
7788 LocalContext context; 7788 LocalContext context;
7789 v8::TryCatch try_catch; 7789 v8::TryCatch try_catch;
7790 const char *source = "function foo() { FAIL.FAIL; }; foo();"; 7790 const char *source = "function foo() { FAIL.FAIL; }; foo();";
7791 v8::Handle<v8::String> src = v8::String::New(source); 7791 v8::Handle<v8::String> src = v8::String::New(source);
7792 v8::Handle<v8::String> origin = v8::String::New("stack-trace-test"); 7792 v8::Handle<v8::String> origin = v8::String::New("stack-trace-test");
7793 v8::Script::New(src, origin)->Run(); 7793 v8::Script::New(src, origin)->Run();
7794 CHECK(try_catch.HasCaught()); 7794 CHECK(try_catch.HasCaught());
7795 v8::String::Utf8Value stack(try_catch.StackTrace()); 7795 v8::String::Utf8Value stack(try_catch.StackTrace());
7796 CHECK(strstr(*stack, "at foo (stack-trace-test") != NULL); 7796 CHECK(strstr(*stack, "at foo (stack-trace-test") != NULL);
7797 } 7797 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698