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

Side by Side Diff: test/cctest/test-profile-generator.cc

Issue 108113002: Removed internal uses of (almost) deprecated FunctionTemplate::New version. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Whitespace. Rebased. 3rd attempt... Created 7 years 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 | « test/cctest/test-platform.cc ('k') | test/cctest/test-thread-termination.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 }; 551 };
552 552
553 553
554 const char* ProfilerExtension::kSource = 554 const char* ProfilerExtension::kSource =
555 "native function startProfiling();" 555 "native function startProfiling();"
556 "native function stopProfiling();"; 556 "native function stopProfiling();";
557 557
558 v8::Handle<v8::FunctionTemplate> ProfilerExtension::GetNativeFunctionTemplate( 558 v8::Handle<v8::FunctionTemplate> ProfilerExtension::GetNativeFunctionTemplate(
559 v8::Isolate* isolate, v8::Handle<v8::String> name) { 559 v8::Isolate* isolate, v8::Handle<v8::String> name) {
560 if (name->Equals(v8::String::NewFromUtf8(isolate, "startProfiling"))) { 560 if (name->Equals(v8::String::NewFromUtf8(isolate, "startProfiling"))) {
561 return v8::FunctionTemplate::New(ProfilerExtension::StartProfiling); 561 return v8::FunctionTemplate::New(isolate,
562 ProfilerExtension::StartProfiling);
562 } else if (name->Equals(v8::String::NewFromUtf8(isolate, "stopProfiling"))) { 563 } else if (name->Equals(v8::String::NewFromUtf8(isolate, "stopProfiling"))) {
563 return v8::FunctionTemplate::New(ProfilerExtension::StopProfiling); 564 return v8::FunctionTemplate::New(isolate, ProfilerExtension::StopProfiling);
564 } else { 565 } else {
565 CHECK(false); 566 CHECK(false);
566 return v8::Handle<v8::FunctionTemplate>(); 567 return v8::Handle<v8::FunctionTemplate>();
567 } 568 }
568 } 569 }
569 570
570 571
571 void ProfilerExtension::StartProfiling( 572 void ProfilerExtension::StartProfiling(
572 const v8::FunctionCallbackInfo<v8::Value>& args) { 573 const v8::FunctionCallbackInfo<v8::Value>& args) {
573 v8::CpuProfiler* cpu_profiler = args.GetIsolate()->GetCpuProfiler(); 574 v8::CpuProfiler* cpu_profiler = args.GetIsolate()->GetCpuProfiler();
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current)); 827 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
827 828
828 current = PickChild(current, "TryFinally"); 829 current = PickChild(current, "TryFinally");
829 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current)); 830 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
830 CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason())); 831 CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason()));
831 832
832 current = PickChild(current, "TryCatch"); 833 current = PickChild(current, "TryCatch");
833 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current)); 834 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
834 CHECK(!strcmp("TryCatchStatement", current->GetBailoutReason())); 835 CHECK(!strcmp("TryCatchStatement", current->GetBailoutReason()));
835 } 836 }
OLDNEW
« no previous file with comments | « test/cctest/test-platform.cc ('k') | test/cctest/test-thread-termination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698