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: src/d8.h

Issue 1240993003: Revert of Make d8 stop using to-be-deprecated APIs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index 4e217640af1b13c63d6470ec497daaa9ae1c6887..ae61dcc63e0ed1df20ff6e8e690713c7950ef437 100644
--- a/src/d8.h
+++ b/src/d8.h
@@ -99,7 +99,7 @@
LineEditor(Type type, const char* name);
virtual ~LineEditor() { }
- virtual Local<String> Prompt(const char* prompt) = 0;
+ virtual Handle<String> Prompt(const char* prompt) = 0;
virtual bool Open(Isolate* isolate) { return true; }
virtual bool Close() { return true; }
virtual void AddHistory(const char* str) { }
@@ -163,7 +163,7 @@
#endif // !V8_SHARED
void ExitShell(int exit_code);
- Local<String> ReadFile(Isolate* isolate, const char* name);
+ Handle<String> ReadFile(Isolate* isolate, const char* name);
const char** argv_;
int begin_offset_;
@@ -349,17 +349,17 @@
public:
enum SourceType { SCRIPT, MODULE };
- static MaybeLocal<Script> CompileString(
+ static Local<Script> CompileString(
Isolate* isolate, Local<String> source, Local<Value> name,
v8::ScriptCompiler::CompileOptions compile_options,
SourceType source_type);
- static bool ExecuteString(Isolate* isolate, Local<String> source,
- Local<Value> name, bool print_result,
+ static bool ExecuteString(Isolate* isolate, Handle<String> source,
+ Handle<Value> name, bool print_result,
bool report_exceptions,
SourceType source_type = SCRIPT);
static const char* ToCString(const v8::String::Utf8Value& value);
static void ReportException(Isolate* isolate, TryCatch* try_catch);
- static Local<String> ReadFile(Isolate* isolate, const char* name);
+ static Handle<String> ReadFile(Isolate* isolate, const char* name);
static Local<Context> CreateEvaluationContext(Isolate* isolate);
static int RunMain(Isolate* isolate, int argc, char* argv[]);
static int Main(int argc, char* argv[]);
@@ -371,8 +371,8 @@
#ifndef V8_SHARED
// TODO(binji): stupid implementation for now. Is there an easy way to hash an
// object for use in i::HashMap? By pointer?
- typedef i::List<Local<Object>> ObjectList;
- static bool SerializeValue(Isolate* isolate, Local<Value> value,
+ typedef i::List<Handle<Object>> ObjectList;
+ static bool SerializeValue(Isolate* isolate, Handle<Value> value,
const ObjectList& to_transfer,
ObjectList* seen_objects,
SerializationData* out_data);
@@ -380,8 +380,9 @@
const SerializationData& data,
int* offset);
static void CleanupWorkers();
- static Local<Array> GetCompletions(Isolate* isolate, Local<String> text,
- Local<String> full);
+ static Handle<Array> GetCompletions(Isolate* isolate,
+ Handle<String> text,
+ Handle<String> full);
static int* LookupCounter(const char* name);
static void* CreateHistogram(const char* name,
int min,
@@ -391,9 +392,9 @@
static void MapCounters(v8::Isolate* isolate, const char* name);
static Local<Object> DebugMessageDetails(Isolate* isolate,
- Local<String> message);
+ Handle<String> message);
static Local<Value> DebugCommandToJSONRequest(Isolate* isolate,
- Local<String> command);
+ Handle<String> command);
static void PerformanceNow(const v8::FunctionCallbackInfo<v8::Value>& args);
#endif // !V8_SHARED
@@ -418,7 +419,7 @@
static void Version(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Read(const v8::FunctionCallbackInfo<v8::Value>& args);
static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value>& args);
- static Local<String> ReadFromStdin(Isolate* isolate);
+ static Handle<String> ReadFromStdin(Isolate* isolate);
static void ReadLine(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(ReadFromStdin(args.GetIsolate()));
}
@@ -463,17 +464,17 @@
static void RemoveDirectory(const v8::FunctionCallbackInfo<v8::Value>& args);
static void AddOSMethods(v8::Isolate* isolate,
- Local<ObjectTemplate> os_template);
+ Handle<ObjectTemplate> os_template);
static const char* kPrompt;
static ShellOptions options;
static ArrayBuffer::Allocator* array_buffer_allocator;
private:
- static Global<Context> evaluation_context_;
+ static Persistent<Context> evaluation_context_;
static base::OnceType quit_once_;
#ifndef V8_SHARED
- static Global<Context> utility_context_;
+ static Persistent<Context> utility_context_;
static CounterMap* counter_map_;
// We statically allocate a set of local counters to be used if we
// don't want to store the stats in a memory-mapped file
@@ -495,7 +496,7 @@
static void InitializeDebugger(Isolate* isolate);
static void RunShell(Isolate* isolate);
static bool SetOptions(int argc, char* argv[]);
- static Local<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate);
+ static Handle<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate);
};
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698