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

Unified Diff: test/cctest/test-decls.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-declarative-accessors.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-decls.cc
diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
index 6be5303cde4643fd85b75b362d40f7905652f063..de45cbcdb884a0061e01bffe51ed93ee8a36fa71 100644
--- a/test/cctest/test-decls.cc
+++ b/test/cctest/test-decls.cc
@@ -27,11 +27,6 @@
#include <stdlib.h>
-// TODO(dcarney): remove
-#define V8_ALLOW_ACCESS_TO_PERSISTENT_ARROW
-#define V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR
-#define V8_ALLOW_ACCESS_TO_PERSISTENT_IMPLICIT
-
#include "v8.h"
#include "heap.h"
@@ -57,8 +52,11 @@ class DeclarationContext {
virtual ~DeclarationContext() {
if (is_initialized_) {
- context_->Exit();
- context_.Dispose(context_->GetIsolate());
+ Isolate* isolate = Isolate::GetCurrent();
+ HandleScope scope(isolate);
+ Local<Context> context = Local<Context>::New(isolate, context_);
+ context->Exit();
+ context_.Dispose(isolate);
}
}
@@ -127,14 +125,14 @@ void DeclarationContext::InitializeIfNeeded() {
&HandleQuery,
0, 0,
data);
- context_.Reset(isolate,
- Context::New(isolate,
- 0,
- function->InstanceTemplate(),
- Local<Value>()));
- context_->Enter();
+ Local<Context> context = Context::New(isolate,
+ 0,
+ function->InstanceTemplate(),
+ Local<Value>());
+ context_.Reset(isolate, context);
+ context->Enter();
is_initialized_ = true;
- PostInitializeContext(Local<Context>::New(isolate, context_));
+ PostInitializeContext(context);
}
« no previous file with comments | « test/cctest/test-declarative-accessors.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698