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

Unified Diff: test/cctest/profiler-extension.cc

Issue 1449393002: Remove deprecated functions the smaller half of the remaing tests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/print-extension.cc ('k') | test/cctest/test-assembler-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/profiler-extension.cc
diff --git a/test/cctest/profiler-extension.cc b/test/cctest/profiler-extension.cc
index c8cb0fb7ca9c0e3ae350e38caf29f6e08458f962..b332c1c4d40eb877c1e2e35de3d6ed6d63871568 100644
--- a/test/cctest/profiler-extension.cc
+++ b/test/cctest/profiler-extension.cc
@@ -27,6 +27,9 @@
//
// Tests of profiles generator and utilities.
+// TODO(jochen): Remove this after the setting is turned on globally.
+#define V8_IMMINENT_DEPRECATION_WARNINGS
+
#include "src/base/logging.h"
#include "test/cctest/profiler-extension.h"
@@ -39,17 +42,25 @@ const char* ProfilerExtension::kSource =
"native function startProfiling();"
"native function stopProfiling();";
-v8::Handle<v8::FunctionTemplate> ProfilerExtension::GetNativeFunctionTemplate(
- v8::Isolate* isolate, v8::Handle<v8::String> name) {
- if (name->Equals(v8::String::NewFromUtf8(isolate, "startProfiling"))) {
+v8::Local<v8::FunctionTemplate> ProfilerExtension::GetNativeFunctionTemplate(
+ v8::Isolate* isolate, v8::Local<v8::String> name) {
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
+ if (name->Equals(context, v8::String::NewFromUtf8(isolate, "startProfiling",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
return v8::FunctionTemplate::New(isolate,
ProfilerExtension::StartProfiling);
- } else if (name->Equals(v8::String::NewFromUtf8(isolate, "stopProfiling"))) {
+ } else if (name->Equals(context,
+ v8::String::NewFromUtf8(isolate, "stopProfiling",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
return v8::FunctionTemplate::New(isolate,
ProfilerExtension::StopProfiling);
} else {
CHECK(false);
- return v8::Handle<v8::FunctionTemplate>();
+ return v8::Local<v8::FunctionTemplate>();
}
}
« no previous file with comments | « test/cctest/print-extension.cc ('k') | test/cctest/test-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698