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

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

Issue 1128533002: [handles] Sanitize Handle and friends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Lower kTargetRecursionDepth. Created 5 years, 5 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 | « src/handles-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 1958
1959 THREADED_TEST(UndefinedIsNotEnumerable) { 1959 THREADED_TEST(UndefinedIsNotEnumerable) {
1960 LocalContext env; 1960 LocalContext env;
1961 v8::HandleScope scope(env->GetIsolate()); 1961 v8::HandleScope scope(env->GetIsolate());
1962 v8::Handle<Value> result = CompileRun("this.propertyIsEnumerable(undefined)"); 1962 v8::Handle<Value> result = CompileRun("this.propertyIsEnumerable(undefined)");
1963 CHECK(result->IsFalse()); 1963 CHECK(result->IsFalse());
1964 } 1964 }
1965 1965
1966 1966
1967 v8::Handle<Script> call_recursively_script; 1967 v8::Handle<Script> call_recursively_script;
1968 static const int kTargetRecursionDepth = 200; // near maximum 1968 static const int kTargetRecursionDepth = 150; // near maximum
1969 1969
1970 1970
1971 static void CallScriptRecursivelyCall( 1971 static void CallScriptRecursivelyCall(
1972 const v8::FunctionCallbackInfo<v8::Value>& args) { 1972 const v8::FunctionCallbackInfo<v8::Value>& args) {
1973 ApiTestFuzzer::Fuzz(); 1973 ApiTestFuzzer::Fuzz();
1974 int depth = args.This()->Get(v8_str("depth"))->Int32Value(); 1974 int depth = args.This()->Get(v8_str("depth"))->Int32Value();
1975 if (depth == kTargetRecursionDepth) return; 1975 if (depth == kTargetRecursionDepth) return;
1976 args.This()->Set(v8_str("depth"), 1976 args.This()->Set(v8_str("depth"),
1977 v8::Integer::New(args.GetIsolate(), depth + 1)); 1977 v8::Integer::New(args.GetIsolate(), depth + 1));
1978 args.GetReturnValue().Set(call_recursively_script->Run()); 1978 args.GetReturnValue().Set(call_recursively_script->Run());
(...skipping 19870 matching lines...) Expand 10 before | Expand all | Expand 10 after
21849 " fake.age;\n" 21849 " fake.age;\n"
21850 " result = 1;\n" 21850 " result = 1;\n"
21851 " } catch (e) {\n" 21851 " } catch (e) {\n"
21852 " }\n" 21852 " }\n"
21853 " test(d+1);\n" 21853 " test(d+1);\n"
21854 "}\n" 21854 "}\n"
21855 "test(0);\n" 21855 "test(0);\n"
21856 "result;\n", 21856 "result;\n",
21857 0); 21857 0);
21858 } 21858 }
OLDNEW
« no previous file with comments | « src/handles-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698