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

Unified Diff: test/cctest/test-sampler-api.cc

Issue 1371363006: Continuing removing deprecated function from cctest (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a bug in test-serialize.cc. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-representation.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-sampler-api.cc
diff --git a/test/cctest/test-sampler-api.cc b/test/cctest/test-sampler-api.cc
index 698eda85629b6040c2e3e5bf20fcaf3fb4d50be4..99a89fbec45dbeabca5a5dd0f3d61223d0afeb1c 100644
--- a/test/cctest/test-sampler-api.cc
+++ b/test/cctest/test-sampler-api.cc
@@ -4,6 +4,9 @@
//
// Tests the sampling API in include/v8.h
+// TODO(mythria): Remove this define after this flag is turned on globally
+#define V8_IMMINENT_DEPRECATION_WARNINGS
+
#include <map>
#include <string>
#include "include/v8.h"
@@ -94,14 +97,13 @@ class SamplingTestHelper {
DCHECK(!instance_);
instance_ = this;
v8::HandleScope scope(isolate_);
- v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate_);
- global->Set(v8::String::NewFromUtf8(isolate_, "CollectSample"),
+ v8::Local<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate_);
+ global->Set(v8_str("CollectSample"),
v8::FunctionTemplate::New(isolate_, CollectSample));
LocalContext env(isolate_, NULL, global);
isolate_->SetJitCodeEventHandler(v8::kJitCodeEventDefault,
JitCodeEventHandler);
- v8::Script::Compile(
- v8::String::NewFromUtf8(isolate_, test_function.c_str()))->Run();
+ CompileRun(v8_str(test_function.c_str()));
}
~SamplingTestHelper() {
« no previous file with comments | « test/cctest/test-representation.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698