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

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

Issue 1877823003: Revert of Fix printf formats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « test/cctest/heap/test-heap.cc ('k') | tools/gyp/v8.gyp » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 bool exists = false; 368 bool exists = false;
369 i::Vector<const char> log( 369 i::Vector<const char> log(
370 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); 370 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
371 CHECK(exists); 371 CHECK(exists);
372 372
373 Address ObjMethod1_entry = reinterpret_cast<Address>(ObjMethod1); 373 Address ObjMethod1_entry = reinterpret_cast<Address>(ObjMethod1);
374 #if USES_FUNCTION_DESCRIPTORS 374 #if USES_FUNCTION_DESCRIPTORS
375 ObjMethod1_entry = *FUNCTION_ENTRYPOINT_ADDRESS(ObjMethod1_entry); 375 ObjMethod1_entry = *FUNCTION_ENTRYPOINT_ADDRESS(ObjMethod1_entry);
376 #endif 376 #endif
377 i::EmbeddedVector<char, 100> ref_data; 377 i::EmbeddedVector<char, 100> ref_data;
378 i::SNPrintF(ref_data, "code-creation,Callback,-2,%p,1,\"method1\"", 378 i::SNPrintF(ref_data,
379 ObjMethod1_entry); 379 "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"method1\"",
380 reinterpret_cast<intptr_t>(ObjMethod1_entry));
380 381
381 CHECK(StrNStr(log.start(), ref_data.start(), log.length())); 382 CHECK(StrNStr(log.start(), ref_data.start(), log.length()));
382 log.Dispose(); 383 log.Dispose();
383 } 384 }
384 isolate->Dispose(); 385 isolate->Dispose();
385 } 386 }
386 387
387 388
388 static void Prop1Getter(v8::Local<v8::String> property, 389 static void Prop1Getter(v8::Local<v8::String> property,
389 const v8::PropertyCallbackInfo<v8::Value>& info) { 390 const v8::PropertyCallbackInfo<v8::Value>& info) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 i::Vector<const char> log( 422 i::Vector<const char> log(
422 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); 423 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
423 CHECK(exists); 424 CHECK(exists);
424 425
425 Address Prop1Getter_entry = reinterpret_cast<Address>(Prop1Getter); 426 Address Prop1Getter_entry = reinterpret_cast<Address>(Prop1Getter);
426 #if USES_FUNCTION_DESCRIPTORS 427 #if USES_FUNCTION_DESCRIPTORS
427 Prop1Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Getter_entry); 428 Prop1Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Getter_entry);
428 #endif 429 #endif
429 EmbeddedVector<char, 100> prop1_getter_record; 430 EmbeddedVector<char, 100> prop1_getter_record;
430 i::SNPrintF(prop1_getter_record, 431 i::SNPrintF(prop1_getter_record,
431 "code-creation,Callback,-2,%p,1,\"get prop1\"", 432 "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"get prop1\"",
432 Prop1Getter_entry); 433 reinterpret_cast<intptr_t>(Prop1Getter_entry));
433 CHECK(StrNStr(log.start(), prop1_getter_record.start(), log.length())); 434 CHECK(StrNStr(log.start(), prop1_getter_record.start(), log.length()));
434 435
435 Address Prop1Setter_entry = reinterpret_cast<Address>(Prop1Setter); 436 Address Prop1Setter_entry = reinterpret_cast<Address>(Prop1Setter);
436 #if USES_FUNCTION_DESCRIPTORS 437 #if USES_FUNCTION_DESCRIPTORS
437 Prop1Setter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Setter_entry); 438 Prop1Setter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Setter_entry);
438 #endif 439 #endif
439 EmbeddedVector<char, 100> prop1_setter_record; 440 EmbeddedVector<char, 100> prop1_setter_record;
440 i::SNPrintF(prop1_setter_record, 441 i::SNPrintF(prop1_setter_record,
441 "code-creation,Callback,-2,%p,1,\"set prop1\"", 442 "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"set prop1\"",
442 Prop1Setter_entry); 443 reinterpret_cast<intptr_t>(Prop1Setter_entry));
443 CHECK(StrNStr(log.start(), prop1_setter_record.start(), log.length())); 444 CHECK(StrNStr(log.start(), prop1_setter_record.start(), log.length()));
444 445
445 Address Prop2Getter_entry = reinterpret_cast<Address>(Prop2Getter); 446 Address Prop2Getter_entry = reinterpret_cast<Address>(Prop2Getter);
446 #if USES_FUNCTION_DESCRIPTORS 447 #if USES_FUNCTION_DESCRIPTORS
447 Prop2Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop2Getter_entry); 448 Prop2Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop2Getter_entry);
448 #endif 449 #endif
449 EmbeddedVector<char, 100> prop2_getter_record; 450 EmbeddedVector<char, 100> prop2_getter_record;
450 i::SNPrintF(prop2_getter_record, 451 i::SNPrintF(prop2_getter_record,
451 "code-creation,Callback,-2,%p,1,\"get prop2\"", 452 "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"get prop2\"",
452 Prop2Getter_entry); 453 reinterpret_cast<intptr_t>(Prop2Getter_entry));
453 CHECK(StrNStr(log.start(), prop2_getter_record.start(), log.length())); 454 CHECK(StrNStr(log.start(), prop2_getter_record.start(), log.length()));
454 log.Dispose(); 455 log.Dispose();
455 } 456 }
456 isolate->Dispose(); 457 isolate->Dispose();
457 } 458 }
458 459
459 460
460 typedef i::NativesCollection<i::TEST> TestSources; 461 typedef i::NativesCollection<i::TEST> TestSources;
461 462
462 463
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac" 609 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac"
609 "(){})();"; 610 "(){})();";
610 611
611 CompileRun(source_text); 612 CompileRun(source_text);
612 613
613 // Must not crash. 614 // Must not crash.
614 logger->LogCompiledFunctions(); 615 logger->LogCompiledFunctions();
615 } 616 }
616 isolate->Dispose(); 617 isolate->Dispose();
617 } 618 }
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698