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

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

Issue 185563004: Fix a few nits found by PVS Studio (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 1 month 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/parser.cc ('k') | test/cctest/test-strings.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 15130 matching lines...) Expand 10 before | Expand all | Expand 10 after
15141 CHECK_EQ(4, elms->Length()); 15141 CHECK_EQ(4, elms->Length());
15142 int elmc0 = 0; 15142 int elmc0 = 0;
15143 const char** elmv0 = NULL; 15143 const char** elmv0 = NULL;
15144 CheckProperties(isolate, 15144 CheckProperties(isolate,
15145 elms->Get(v8::Integer::New(isolate, 0)), elmc0, elmv0); 15145 elms->Get(v8::Integer::New(isolate, 0)), elmc0, elmv0);
15146 15146
15147 v8::Handle<v8::Value> val = elms->Get(v8::Integer::New(isolate, 0)); 15147 v8::Handle<v8::Value> val = elms->Get(v8::Integer::New(isolate, 0));
15148 v8::Handle<v8::Array> props = val.As<v8::Object>()->GetPropertyNames(); 15148 v8::Handle<v8::Array> props = val.As<v8::Object>()->GetPropertyNames();
15149 CHECK_EQ(0, props->Length()); 15149 CHECK_EQ(0, props->Length());
15150 for (uint32_t i = 0; i < props->Length(); i++) { 15150 for (uint32_t i = 0; i < props->Length(); i++) {
15151 printf("p[%d]\n", i); 15151 printf("p[%u]\n", i);
15152 } 15152 }
15153 } 15153 }
15154 15154
15155 static bool NamedSetAccessBlocker(Local<v8::Object> obj, 15155 static bool NamedSetAccessBlocker(Local<v8::Object> obj,
15156 Local<Value> name, 15156 Local<Value> name,
15157 v8::AccessType type, 15157 v8::AccessType type,
15158 Local<Value> data) { 15158 Local<Value> data) {
15159 return type != v8::ACCESS_SET; 15159 return type != v8::ACCESS_SET;
15160 } 15160 }
15161 15161
(...skipping 8971 matching lines...) Expand 10 before | Expand all | Expand 10 after
24133 char chunk2[] = 24133 char chunk2[] =
24134 "XX\xec\x92\x81r = 13;\n" 24134 "XX\xec\x92\x81r = 13;\n"
24135 " return foob\xec\x92\x81\xec\x92\x81r;\n" 24135 " return foob\xec\x92\x81\xec\x92\x81r;\n"
24136 "}\n"; 24136 "}\n";
24137 chunk1[strlen(chunk1) - 1] = reference[0]; 24137 chunk1[strlen(chunk1) - 1] = reference[0];
24138 chunk2[0] = reference[1]; 24138 chunk2[0] = reference[1];
24139 chunk2[1] = reference[2]; 24139 chunk2[1] = reference[2];
24140 const char* chunks[] = {chunk1, chunk2, "foo();", NULL}; 24140 const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
24141 RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8); 24141 RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
24142 } 24142 }
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698