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

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

Issue 15964004: remove most V8_ALLOW_ACCESS_TO_* defines from test classes (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comment addressed Created 7 years, 7 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-cpu-profiler.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 c4df73ebbd201ab90ea6a4e363457afd3ac2c753..d802a85aa69b079d28f440e0607cfa147cc68dd0 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -29,10 +29,6 @@
#include <stdlib.h>
-// TODO(dcarney): remove
-#define V8_ALLOW_ACCESS_TO_PERSISTENT_ARROW
-#define V8_ALLOW_ACCESS_TO_PERSISTENT_IMPLICIT
-
#include "v8.h"
#include "api.h"
@@ -6626,7 +6622,15 @@ TEST(ScriptCollectedEventContext) {
v8::HandleScope scope(isolate);
context.Reset(isolate, v8::Context::New(isolate));
}
- context->Enter();
+
+ // Enter context. We can't have a handle to the context in the outer
+ // scope, so we have to do it the hard way.
+ {
+ v8::HandleScope scope(isolate);
+ v8::Local<v8::Context> local_context =
+ v8::Local<v8::Context>::New(isolate, context);
+ local_context->Enter();
+ }
// Request the loaded scripts to initialize the debugger script cache.
debug->GetLoadedScripts();
@@ -6639,7 +6643,13 @@ TEST(ScriptCollectedEventContext) {
v8::Script::Compile(v8::String::New("eval('a=1')"))->Run();
v8::Script::Compile(v8::String::New("eval('a=2')"))->Run();
- context->Exit();
+ // Leave context
+ {
+ v8::HandleScope scope(isolate);
+ v8::Local<v8::Context> local_context =
+ v8::Local<v8::Context>::New(isolate, context);
+ local_context->Exit();
+ }
context.Dispose(isolate);
// Do garbage collection to collect the script above which is no longer
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-declarative-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698