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

Side by Side Diff: src/api.cc

Issue 16114002: Deprecate profiler methods that accept security origin (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: defined V8_DISABLE_DEPRECATIONS in test-cpu-profiler.cc and returned deleted test for deprecated API Created 7 years, 6 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 | « include/v8-profiler.h ('k') | test/cctest/test-cpu-profiler.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 7225 matching lines...) Expand 10 before | Expand all | Expand 10 after
7236 7236
7237 const CpuProfile* CpuProfiler::GetCpuProfile(int index, 7237 const CpuProfile* CpuProfiler::GetCpuProfile(int index,
7238 Handle<Value> security_token) { 7238 Handle<Value> security_token) {
7239 return reinterpret_cast<const CpuProfile*>( 7239 return reinterpret_cast<const CpuProfile*>(
7240 reinterpret_cast<i::CpuProfiler*>(this)->GetProfile( 7240 reinterpret_cast<i::CpuProfiler*>(this)->GetProfile(
7241 security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token), 7241 security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
7242 index)); 7242 index));
7243 } 7243 }
7244 7244
7245 7245
7246 const CpuProfile* CpuProfiler::GetCpuProfile(int index) {
7247 return reinterpret_cast<const CpuProfile*>(
7248 reinterpret_cast<i::CpuProfiler*>(this)->GetProfile(NULL, index));
7249 }
7250
7251
7246 const CpuProfile* CpuProfiler::FindProfile(unsigned uid, 7252 const CpuProfile* CpuProfiler::FindProfile(unsigned uid,
7247 Handle<Value> security_token) { 7253 Handle<Value> security_token) {
7248 i::Isolate* isolate = i::Isolate::Current(); 7254 i::Isolate* isolate = i::Isolate::Current();
7249 IsDeadCheck(isolate, "v8::CpuProfiler::FindProfile"); 7255 IsDeadCheck(isolate, "v8::CpuProfiler::FindProfile");
7250 i::CpuProfiler* profiler = isolate->cpu_profiler(); 7256 i::CpuProfiler* profiler = isolate->cpu_profiler();
7251 ASSERT(profiler != NULL); 7257 ASSERT(profiler != NULL);
7252 return reinterpret_cast<const CpuProfile*>( 7258 return reinterpret_cast<const CpuProfile*>(
7253 profiler->FindProfile( 7259 profiler->FindProfile(
7254 security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token), 7260 security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
7255 uid)); 7261 uid));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
7295 7301
7296 const CpuProfile* CpuProfiler::StopCpuProfiling(Handle<String> title, 7302 const CpuProfile* CpuProfiler::StopCpuProfiling(Handle<String> title,
7297 Handle<Value> security_token) { 7303 Handle<Value> security_token) {
7298 return reinterpret_cast<const CpuProfile*>( 7304 return reinterpret_cast<const CpuProfile*>(
7299 reinterpret_cast<i::CpuProfiler*>(this)->StopProfiling( 7305 reinterpret_cast<i::CpuProfiler*>(this)->StopProfiling(
7300 security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token), 7306 security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
7301 *Utils::OpenHandle(*title))); 7307 *Utils::OpenHandle(*title)));
7302 } 7308 }
7303 7309
7304 7310
7311 const CpuProfile* CpuProfiler::StopCpuProfiling(Handle<String> title) {
7312 return reinterpret_cast<const CpuProfile*>(
7313 reinterpret_cast<i::CpuProfiler*>(this)->StopProfiling(
7314 NULL,
7315 *Utils::OpenHandle(*title)));
7316 }
7317
7318
7305 void CpuProfiler::DeleteAllProfiles() { 7319 void CpuProfiler::DeleteAllProfiles() {
7306 i::Isolate* isolate = i::Isolate::Current(); 7320 i::Isolate* isolate = i::Isolate::Current();
7307 IsDeadCheck(isolate, "v8::CpuProfiler::DeleteAllProfiles"); 7321 IsDeadCheck(isolate, "v8::CpuProfiler::DeleteAllProfiles");
7308 i::CpuProfiler* profiler = isolate->cpu_profiler(); 7322 i::CpuProfiler* profiler = isolate->cpu_profiler();
7309 ASSERT(profiler != NULL); 7323 ASSERT(profiler != NULL);
7310 profiler->DeleteAllProfiles(); 7324 profiler->DeleteAllProfiles();
7311 } 7325 }
7312 7326
7313 7327
7314 void CpuProfiler::DeleteAllCpuProfiles() { 7328 void CpuProfiler::DeleteAllCpuProfiles() {
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
7889 7903
7890 v->VisitPointers(blocks_.first(), first_block_limit_); 7904 v->VisitPointers(blocks_.first(), first_block_limit_);
7891 7905
7892 for (int i = 1; i < blocks_.length(); i++) { 7906 for (int i = 1; i < blocks_.length(); i++) {
7893 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 7907 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
7894 } 7908 }
7895 } 7909 }
7896 7910
7897 7911
7898 } } // namespace v8::internal 7912 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698