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

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

Issue 7618040: Version 3.5.5. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/cctest/test-api.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 26 matching lines...) Expand all
37 using ::v8::ObjectTemplate; 37 using ::v8::ObjectTemplate;
38 using ::v8::Value; 38 using ::v8::Value;
39 using ::v8::Context; 39 using ::v8::Context;
40 using ::v8::Local; 40 using ::v8::Local;
41 using ::v8::String; 41 using ::v8::String;
42 using ::v8::Script; 42 using ::v8::Script;
43 using ::v8::Function; 43 using ::v8::Function;
44 using ::v8::AccessorInfo; 44 using ::v8::AccessorInfo;
45 using ::v8::Extension; 45 using ::v8::Extension;
46 46
47 namespace i = ::v8::internal;
48
49 static v8::Handle<Value> handle_property(Local<String> name, 47 static v8::Handle<Value> handle_property(Local<String> name,
50 const AccessorInfo&) { 48 const AccessorInfo&) {
51 ApiTestFuzzer::Fuzz(); 49 ApiTestFuzzer::Fuzz();
52 return v8_num(900); 50 return v8_num(900);
53 } 51 }
54 52
55 53
56 THREADED_TEST(PropertyHandler) { 54 THREADED_TEST(PropertyHandler) {
57 v8::HandleScope scope; 55 v8::HandleScope scope;
58 Local<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New(); 56 Local<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New();
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 obj->SetAccessor(v8_str("xxx"), AllocateHandles); 439 obj->SetAccessor(v8_str("xxx"), AllocateHandles);
442 LocalContext env; 440 LocalContext env;
443 env->Global()->Set(v8_str("obj"), obj->NewInstance()); 441 env->Global()->Set(v8_str("obj"), obj->NewInstance());
444 v8::Handle<v8::Value> result = Script::Compile(String::New( 442 v8::Handle<v8::Value> result = Script::Compile(String::New(
445 "var result;" 443 "var result;"
446 "for (var i = 0; i < 4; i++)" 444 "for (var i = 0; i < 4; i++)"
447 " result = obj.xxx;" 445 " result = obj.xxx;"
448 "result;"))->Run(); 446 "result;"))->Run();
449 CHECK_EQ(100, result->Int32Value()); 447 CHECK_EQ(100, result->Int32Value());
450 } 448 }
OLDNEW
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698