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

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

Issue 9113012: Fix broken test that assumes that no GC can clear the regexp (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 11 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 14220 matching lines...) Expand 10 before | Expand all | Expand 10 after
14231 LocalContext context; 14231 LocalContext context;
14232 14232
14233 const char* code = 14233 const char* code =
14234 "(function() {" 14234 "(function() {"
14235 " var keys = [];" 14235 " var keys = [];"
14236 " for (var i = 0; i < 16; i++) keys.push(i);" 14236 " for (var i = 0; i < 16; i++) keys.push(i);"
14237 " var values = [];" 14237 " var values = [];"
14238 " for (var i = 0; i < 16; i++) values[i] = %_GetFromCache(0, keys[i]);" 14238 " for (var i = 0; i < 16; i++) values[i] = %_GetFromCache(0, keys[i]);"
14239 " for (var i = 0; i < 16; i++) {" 14239 " for (var i = 0; i < 16; i++) {"
14240 " var v = %_GetFromCache(0, keys[i]);" 14240 " var v = %_GetFromCache(0, keys[i]);"
14241 " if (v !== values[i])" 14241 " if (v.toString() !== values[i].toString())"
14242 " return 'Wrong value for ' + " 14242 " return 'Wrong value for ' + "
14243 " keys[i] + ': ' + v + ' vs. ' + values[i];" 14243 " keys[i] + ': ' + v + ' vs. ' + values[i];"
14244 " };" 14244 " };"
14245 " return 'PASSED';" 14245 " return 'PASSED';"
14246 "})()"; 14246 "})()";
14247 HEAP->ClearJSFunctionResultCaches(); 14247 HEAP->ClearJSFunctionResultCaches();
14248 ExpectString(code, "PASSED"); 14248 ExpectString(code, "PASSED");
14249 } 14249 }
14250 14250
14251 14251
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
15814 CompileRun("throw 'exception';"); 15814 CompileRun("throw 'exception';");
15815 } 15815 }
15816 15816
15817 15817
15818 TEST(CallCompletedCallbackTwoExceptions) { 15818 TEST(CallCompletedCallbackTwoExceptions) {
15819 v8::HandleScope scope; 15819 v8::HandleScope scope;
15820 LocalContext env; 15820 LocalContext env;
15821 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); 15821 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException);
15822 CompileRun("throw 'first exception';"); 15822 CompileRun("throw 'first exception';");
15823 } 15823 }
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