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 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 THREADED_TEST(UndefinedIsNotEnumerable) { | 1144 THREADED_TEST(UndefinedIsNotEnumerable) { |
1145 v8::HandleScope scope; | 1145 v8::HandleScope scope; |
1146 LocalContext env; | 1146 LocalContext env; |
1147 v8::Handle<Value> result = Script::Compile(v8_str( | 1147 v8::Handle<Value> result = Script::Compile(v8_str( |
1148 "this.propertyIsEnumerable(undefined)"))->Run(); | 1148 "this.propertyIsEnumerable(undefined)"))->Run(); |
1149 CHECK(result->IsFalse()); | 1149 CHECK(result->IsFalse()); |
1150 } | 1150 } |
1151 | 1151 |
1152 | 1152 |
1153 v8::Handle<Script> call_recursively_script; | 1153 v8::Handle<Script> call_recursively_script; |
1154 static const int kTargetRecursionDepth = 300; // near maximum | 1154 static const int kTargetRecursionDepth = 200; // near maximum |
1155 | 1155 |
1156 | 1156 |
1157 static v8::Handle<Value> CallScriptRecursivelyCall(const v8::Arguments& args) { | 1157 static v8::Handle<Value> CallScriptRecursivelyCall(const v8::Arguments& args) { |
1158 ApiTestFuzzer::Fuzz(); | 1158 ApiTestFuzzer::Fuzz(); |
1159 int depth = args.This()->Get(v8_str("depth"))->Int32Value(); | 1159 int depth = args.This()->Get(v8_str("depth"))->Int32Value(); |
1160 if (depth == kTargetRecursionDepth) return v8::Undefined(); | 1160 if (depth == kTargetRecursionDepth) return v8::Undefined(); |
1161 args.This()->Set(v8_str("depth"), v8::Integer::New(depth + 1)); | 1161 args.This()->Set(v8_str("depth"), v8::Integer::New(depth + 1)); |
1162 return call_recursively_script->Run(); | 1162 return call_recursively_script->Run(); |
1163 } | 1163 } |
1164 | 1164 |
(...skipping 7547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8712 CompileRun(source_exception); | 8712 CompileRun(source_exception); |
8713 other_context->Exit(); | 8713 other_context->Exit(); |
8714 v8::internal::Heap::CollectAllGarbage(false); | 8714 v8::internal::Heap::CollectAllGarbage(false); |
8715 if (GetGlobalObjectsCount() == 1) break; | 8715 if (GetGlobalObjectsCount() == 1) break; |
8716 } | 8716 } |
8717 CHECK_GE(2, gc_count); | 8717 CHECK_GE(2, gc_count); |
8718 CHECK_EQ(1, GetGlobalObjectsCount()); | 8718 CHECK_EQ(1, GetGlobalObjectsCount()); |
8719 | 8719 |
8720 other_context.Dispose(); | 8720 other_context.Dispose(); |
8721 } | 8721 } |
OLD | NEW |