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

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

Issue 3133027: Fix local handle leak in RegExpStringModificationTest. (Closed)
Patch Set: Created 10 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
« 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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 9185 matching lines...) Expand 10 before | Expand all | Expand 10 after
9196 } 9196 }
9197 morph_success_ = true; 9197 morph_success_ = true;
9198 } 9198 }
9199 9199
9200 void LongRunningRegExp() { 9200 void LongRunningRegExp() {
9201 block_->Signal(); // Enable morphing thread on next preemption. 9201 block_->Signal(); // Enable morphing thread on next preemption.
9202 while (morphs_during_regexp_ < kRequiredModifications && 9202 while (morphs_during_regexp_ < kRequiredModifications &&
9203 morphs_ < kMaxModifications) { 9203 morphs_ < kMaxModifications) {
9204 int morphs_before = morphs_; 9204 int morphs_before = morphs_;
9205 { 9205 {
9206 v8::HandleScope scope;
9206 // Match 15-30 "a"'s against 14 and a "b". 9207 // Match 15-30 "a"'s against 14 and a "b".
9207 const char* c_source = 9208 const char* c_source =
9208 "/a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaa/" 9209 "/a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaa/"
9209 ".exec(input) === null"; 9210 ".exec(input) === null";
9210 Local<String> source = String::New(c_source); 9211 Local<String> source = String::New(c_source);
9211 Local<Script> script = Script::Compile(source); 9212 Local<Script> script = Script::Compile(source);
9212 Local<Value> result = script->Run(); 9213 Local<Value> result = script->Run();
9213 CHECK(result->IsTrue()); 9214 CHECK(result->IsTrue());
9214 } 9215 }
9215 int morphs_after = morphs_; 9216 int morphs_after = morphs_;
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
11277 ExpectFalse("Object.prototype.hasOwnProperty.call(other, \'0\')"); 11278 ExpectFalse("Object.prototype.hasOwnProperty.call(other, \'0\')");
11278 11279
11279 CHECK_EQ(false, global0->HasRealIndexedProperty(0)); 11280 CHECK_EQ(false, global0->HasRealIndexedProperty(0));
11280 CHECK_EQ(false, global0->HasRealNamedProperty(v8_str("x"))); 11281 CHECK_EQ(false, global0->HasRealNamedProperty(v8_str("x")));
11281 CHECK_EQ(false, global0->HasRealNamedCallbackProperty(v8_str("x"))); 11282 CHECK_EQ(false, global0->HasRealNamedCallbackProperty(v8_str("x")));
11282 11283
11283 // Reset the failed access check callback so it does not influence 11284 // Reset the failed access check callback so it does not influence
11284 // the other tests. 11285 // the other tests.
11285 v8::V8::SetFailedAccessCheckCallbackFunction(NULL); 11286 v8::V8::SetFailedAccessCheckCallbackFunction(NULL);
11286 } 11287 }
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