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

Side by Side Diff: src/log.cc

Issue 9408: Removed some unsafe uses of StringShape.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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/jsregexp.cc ('k') | src/objects.h » ('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-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 int start_index, 424 int start_index,
425 Handle<String> input_string) { 425 Handle<String> input_string) {
426 #ifdef ENABLE_LOGGING_AND_PROFILING 426 #ifdef ENABLE_LOGGING_AND_PROFILING
427 if (logfile_ == NULL || !FLAG_log_regexp) return; 427 if (logfile_ == NULL || !FLAG_log_regexp) return;
428 ScopedLock sl(mutex_); 428 ScopedLock sl(mutex_);
429 429
430 fprintf(logfile_, "regexp-run,"); 430 fprintf(logfile_, "regexp-run,");
431 LogRegExpSource(regexp); 431 LogRegExpSource(regexp);
432 fprintf(logfile_, ","); 432 fprintf(logfile_, ",");
433 LogString(input_string); 433 LogString(input_string);
434 StringShape shape(*input_string); 434 fprintf(logfile_, ",%d..%d\n", start_index, input_string->length());
435 fprintf(logfile_, ",%d..%d\n", start_index, input_string->length(shape));
436 #endif 435 #endif
437 } 436 }
438 437
439 438
440 void Logger::ApiIndexedSecurityCheck(uint32_t index) { 439 void Logger::ApiIndexedSecurityCheck(uint32_t index) {
441 #ifdef ENABLE_LOGGING_AND_PROFILING 440 #ifdef ENABLE_LOGGING_AND_PROFILING
442 if (logfile_ == NULL || !FLAG_log_api) return; 441 if (logfile_ == NULL || !FLAG_log_api) return;
443 ApiEvent("api,check-security,%u\n", index); 442 ApiEvent("api,check-security,%u\n", index);
444 #endif 443 #endif
445 } 444 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 if (FLAG_log_state_changes) { 841 if (FLAG_log_state_changes) {
843 LOG(StringEvent("Leaving", StateToString(state_))); 842 LOG(StringEvent("Leaving", StateToString(state_)));
844 if (previous_) { 843 if (previous_) {
845 LOG(StringEvent("To", StateToString(previous_->state_))); 844 LOG(StringEvent("To", StateToString(previous_->state_)));
846 } 845 }
847 } 846 }
848 } 847 }
849 #endif 848 #endif
850 849
851 } } // namespace v8::internal 850 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698