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

Unified Diff: test/cctest/test-debug.cc

Issue 15817014: remove most uses of raw handle constructors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: stupid cast needed 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-declarative-accessors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index b22092a2632b9fa7635ba9f57fef327650c72db7..ed79205c223318912803a1932c1771ba2784b7ae 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -143,6 +143,7 @@ class DebugLocalContext {
inline ~DebugLocalContext() {
context_->Exit();
}
+ inline v8::Local<v8::Context> context() { return context_; }
inline v8::Context* operator->() { return *context_; }
inline v8::Context* operator*() { return *context_; }
inline bool IsReady() { return !context_.IsEmpty(); }
@@ -788,8 +789,8 @@ static void DebugEventCounter(v8::DebugEvent event,
// Check whether the exception was uncaught.
v8::Local<v8::String> fun_name = v8::String::New("uncaught");
v8::Local<v8::Function> fun =
- v8::Function::Cast(*event_data->Get(fun_name));
- v8::Local<v8::Value> result = *fun->Call(event_data, 0, NULL);
+ v8::Local<v8::Function>::Cast(event_data->Get(fun_name));
+ v8::Local<v8::Value> result = fun->Call(event_data, 0, NULL);
if (result->IsTrue()) {
uncaught_exception_hit_count++;
}
@@ -6457,7 +6458,7 @@ static void ExecuteScriptForContextCheck() {
// Enter and run function in the context.
{
v8::Context::Scope context_scope(context_1);
- expected_context = v8::Local<v8::Context>(*context_1);
+ expected_context = context_1;
expected_context_data = data_1;
v8::Local<v8::Function> f = CompileFunction(source, "f");
f->Call(context_1->Global(), 0, NULL);
@@ -7041,11 +7042,11 @@ static void DebugEventGetAtgumentPropertyValue(
if (event == v8::Break) {
break_point_hit_count++;
CHECK(debugger_context == v8::Context::GetCurrent());
- v8::Handle<v8::Function> func(v8::Function::Cast(*CompileRun(
+ v8::Handle<v8::Function> func = v8::Handle<v8::Function>::Cast(CompileRun(
"(function(exec_state) {\n"
" return (exec_state.frame(0).argumentValue(0).property('a').\n"
" value().value() == 1);\n"
- "})")));
+ "})"));
const int argc = 1;
v8::Handle<v8::Value> argv[argc] = { exec_state };
v8::Handle<v8::Value> result = func->Call(exec_state, argc, argv);
@@ -7063,7 +7064,7 @@ TEST(CallingContextIsNotDebugContext) {
// Save handles to the debugger and debugee contexts to be used in
// NamedGetterWithCallingContextCheck.
- debugee_context = v8::Local<v8::Context>(*env);
+ debugee_context = env.context();
debugger_context = v8::Utils::ToLocal(debug->debug_context());
// Create object with 'a' property accessor.
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-declarative-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698