OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |