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

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

Issue 1331013003: Continuing removing deprecated functions from cctests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Continuing removing deprecated functions from cctest Created 5 years, 3 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/trace-extension.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/trace-extension.cc
diff --git a/test/cctest/trace-extension.cc b/test/cctest/trace-extension.cc
index e7f097f86fe21b535d98d6ac5205b43ead2a01b9..76524d1f0b746f0fc5f8b4d158ad3faa4839d357 100644
--- a/test/cctest/trace-extension.cc
+++ b/test/cctest/trace-extension.cc
@@ -25,6 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// TODO(mythria): Remove this after this flag is turned on globally
+#define V8_IMMINENT_DEPRECATION_WARNINGS
+
#include "test/cctest/trace-extension.h"
#include "src/sampler.h"
@@ -41,20 +44,35 @@ const char* TraceExtension::kSource =
"native function js_entry_sp_level2();";
-v8::Handle<v8::FunctionTemplate> TraceExtension::GetNativeFunctionTemplate(
- v8::Isolate* isolate, v8::Handle<v8::String> name) {
- if (name->Equals(v8::String::NewFromUtf8(isolate, "trace"))) {
+v8::Local<v8::FunctionTemplate> TraceExtension::GetNativeFunctionTemplate(
+ v8::Isolate* isolate, v8::Local<v8::String> name) {
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
+ if (name->Equals(context, v8::String::NewFromUtf8(isolate, "trace",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
return v8::FunctionTemplate::New(isolate, TraceExtension::Trace);
- } else if (name->Equals(v8::String::NewFromUtf8(isolate, "js_trace"))) {
+ } else if (name->Equals(context,
+ v8::String::NewFromUtf8(isolate, "js_trace",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
return v8::FunctionTemplate::New(isolate, TraceExtension::JSTrace);
- } else if (name->Equals(v8::String::NewFromUtf8(isolate, "js_entry_sp"))) {
+ } else if (name->Equals(context,
+ v8::String::NewFromUtf8(isolate, "js_entry_sp",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
return v8::FunctionTemplate::New(isolate, TraceExtension::JSEntrySP);
- } else if (name->Equals(v8::String::NewFromUtf8(isolate,
- "js_entry_sp_level2"))) {
+ } else if (name->Equals(context,
+ v8::String::NewFromUtf8(isolate, "js_entry_sp_level2",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
return v8::FunctionTemplate::New(isolate, TraceExtension::JSEntrySPLevel2);
} else {
CHECK(false);
- return v8::Handle<v8::FunctionTemplate>();
+ return v8::Local<v8::FunctionTemplate>();
}
}
« no previous file with comments | « test/cctest/trace-extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698