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

Unified Diff: src/mksnapshot.cc

Issue 15994003: remove most remaining V8_ALLOW_ACCESS_TO* defines (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments 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 | « src/d8.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc
index 7592a8953110683c83c8f7e8942a57cd32555df7..978ea217bd9e4af37d25bebc8f4d031f70c3a0d4 100644
--- a/src/mksnapshot.cc
+++ b/src/mksnapshot.cc
@@ -32,10 +32,6 @@
#endif
#include <signal.h>
-// TODO(dcarney): remove
-#define V8_ALLOW_ACCESS_TO_PERSISTENT_ARROW
-#define V8_ALLOW_ACCESS_TO_PERSISTENT_IMPLICIT
-
#include "v8.h"
#include "bootstrapper.h"
@@ -341,10 +337,10 @@ int main(int argc, char** argv) {
exit(1);
}
if (i::FLAG_extra_code != NULL) {
- context->Enter();
// Capture 100 frames if anything happens.
V8::SetCaptureStackTraceForUncaughtExceptions(true, 100);
HandleScope scope(isolate);
+ v8::Context::Scope(v8::Local<v8::Context>::New(isolate, context));
const char* name = i::FLAG_extra_code;
FILE* file = i::OS::FOpen(name, "rb");
if (file == NULL) {
@@ -381,7 +377,6 @@ int main(int argc, char** argv) {
DumpException(try_catch.Message());
exit(1);
}
- context->Exit();
}
// Make sure all builtin scripts are cached.
{ HandleScope scope(isolate);
@@ -393,7 +388,7 @@ int main(int argc, char** argv) {
// context even after we have disposed of the context.
HEAP->CollectAllGarbage(i::Heap::kNoGCFlags, "mksnapshot");
i::Object* raw_context = *(v8::Utils::OpenHandle(*context));
- context.Dispose(context->GetIsolate());
+ context.Dispose(isolate);
CppByteSink sink(argv[1]);
// This results in a somewhat smaller snapshot, probably because it gets rid
// of some things that are cached between garbage collections.
« no previous file with comments | « src/d8.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698