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

Unified Diff: src/d8.cc

Issue 157543002: A64: Synchronize with r18581. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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.h ('k') | src/d8-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 00eca1907d64f661c9836aba96cb375677cb59dd..1560b09a2b5b77cda7b6592b07be6aa865503f46 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -626,9 +626,9 @@ Handle<Array> Shell::GetCompletions(Isolate* isolate,
#ifdef ENABLE_DEBUGGER_SUPPORT
-Handle<Object> Shell::DebugMessageDetails(Isolate* isolate,
- Handle<String> message) {
- HandleScope handle_scope(isolate);
+Local<Object> Shell::DebugMessageDetails(Isolate* isolate,
+ Handle<String> message) {
+ EscapableHandleScope handle_scope(isolate);
v8::Local<v8::Context> context =
v8::Local<v8::Context>::New(isolate, utility_context_);
v8::Context::Scope context_scope(context);
@@ -638,13 +638,13 @@ Handle<Object> Shell::DebugMessageDetails(Isolate* isolate,
static const int kArgc = 1;
Handle<Value> argv[kArgc] = { message };
Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv);
- return Handle<Object>::Cast(val);
+ return handle_scope.Escape(Local<Object>(Handle<Object>::Cast(val)));
}
-Handle<Value> Shell::DebugCommandToJSONRequest(Isolate* isolate,
- Handle<String> command) {
- HandleScope handle_scope(isolate);
+Local<Value> Shell::DebugCommandToJSONRequest(Isolate* isolate,
+ Handle<String> command) {
+ EscapableHandleScope handle_scope(isolate);
v8::Local<v8::Context> context =
v8::Local<v8::Context>::New(isolate, utility_context_);
v8::Context::Scope context_scope(context);
@@ -654,7 +654,7 @@ Handle<Value> Shell::DebugCommandToJSONRequest(Isolate* isolate,
static const int kArgc = 1;
Handle<Value> argv[kArgc] = { command };
Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv);
- return val;
+ return handle_scope.Escape(Local<Value>(val));
}
@@ -858,7 +858,7 @@ class BZip2Decompressor : public v8::StartupDataDecompressor {
Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
- Handle<ObjectTemplate> global_template = ObjectTemplate::New();
+ Handle<ObjectTemplate> global_template = ObjectTemplate::New(isolate);
global_template->Set(String::NewFromUtf8(isolate, "print"),
FunctionTemplate::New(isolate, Print));
global_template->Set(String::NewFromUtf8(isolate, "write"),
@@ -877,7 +877,7 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
FunctionTemplate::New(isolate, Version));
// Bind the Realm object.
- Handle<ObjectTemplate> realm_template = ObjectTemplate::New();
+ Handle<ObjectTemplate> realm_template = ObjectTemplate::New(isolate);
realm_template->Set(String::NewFromUtf8(isolate, "current"),
FunctionTemplate::New(isolate, RealmCurrent));
realm_template->Set(String::NewFromUtf8(isolate, "owner"),
@@ -897,7 +897,7 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
global_template->Set(String::NewFromUtf8(isolate, "Realm"), realm_template);
#ifndef V8_SHARED
- Handle<ObjectTemplate> performance_template = ObjectTemplate::New();
+ Handle<ObjectTemplate> performance_template = ObjectTemplate::New(isolate);
performance_template->Set(String::NewFromUtf8(isolate, "now"),
FunctionTemplate::New(isolate, PerformanceNow));
global_template->Set(String::NewFromUtf8(isolate, "performance"),
@@ -905,7 +905,7 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
#endif // V8_SHARED
#if !defined(V8_SHARED) && !defined(_WIN32) && !defined(_WIN64)
- Handle<ObjectTemplate> os_templ = ObjectTemplate::New();
+ Handle<ObjectTemplate> os_templ = ObjectTemplate::New(isolate);
AddOSMethods(isolate, os_templ);
global_template->Set(String::NewFromUtf8(isolate, "os"), os_templ);
#endif // V8_SHARED
@@ -1133,7 +1133,8 @@ void Shell::ReadBuffer(const v8::FunctionCallbackInfo<v8::Value>& args) {
Throw(args.GetIsolate(), "Error reading file");
return;
}
- Handle<v8::ArrayBuffer> buffer = ArrayBuffer::New(isolate, data, length);
+ Handle<v8::ArrayBuffer> buffer =
+ ArrayBuffer::New(isolate, data->data, length);
data->handle.Reset(isolate, buffer);
data->handle.SetWeak(data, ReadBufferWeakCallback);
data->handle.MarkIndependent();
« no previous file with comments | « src/d8.h ('k') | src/d8-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698