| OLD | NEW | 
|    1 // Copyright 2012 the V8 project authors. All rights reserved. |    1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #ifndef V8_D8_H_ |    5 #ifndef V8_D8_H_ | 
|    6 #define V8_D8_H_ |    6 #define V8_D8_H_ | 
|    7  |    7  | 
|    8 #include <iterator> |    8 #include <iterator> | 
|    9 #include <memory> |    9 #include <memory> | 
|   10 #include <string> |   10 #include <string> | 
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  273  |  273  | 
|  274   base::Semaphore in_semaphore_; |  274   base::Semaphore in_semaphore_; | 
|  275   base::Semaphore out_semaphore_; |  275   base::Semaphore out_semaphore_; | 
|  276   SerializationDataQueue in_queue_; |  276   SerializationDataQueue in_queue_; | 
|  277   SerializationDataQueue out_queue_; |  277   SerializationDataQueue out_queue_; | 
|  278   base::Thread* thread_; |  278   base::Thread* thread_; | 
|  279   char* script_; |  279   char* script_; | 
|  280   base::Atomic32 running_; |  280   base::Atomic32 running_; | 
|  281 }; |  281 }; | 
|  282  |  282  | 
|  283  |  | 
|  284 class ShellOptions { |  283 class ShellOptions { | 
|  285  public: |  284  public: | 
|  286   ShellOptions() |  285   ShellOptions() | 
|  287       : script_executed(false), |  286       : script_executed(false), | 
|  288         send_idle_notification(false), |  287         send_idle_notification(false), | 
|  289         invoke_weak_callbacks(false), |  288         invoke_weak_callbacks(false), | 
|  290         omit_quit(false), |  289         omit_quit(false), | 
|  291         stress_opt(false), |  290         stress_opt(false), | 
|  292         stress_deopt(false), |  291         stress_deopt(false), | 
|  293         stress_runs(1), |  292         stress_runs(1), | 
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  433   // with the current umask.  Intermediate directories are created if necessary. |  432   // with the current umask.  Intermediate directories are created if necessary. | 
|  434   // An exception is not thrown if the directory already exists.  Analogous to |  433   // An exception is not thrown if the directory already exists.  Analogous to | 
|  435   // the "mkdir -p" command. |  434   // the "mkdir -p" command. | 
|  436   static void System(const v8::FunctionCallbackInfo<v8::Value>& args); |  435   static void System(const v8::FunctionCallbackInfo<v8::Value>& args); | 
|  437   static void ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); |  436   static void ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); | 
|  438   static void SetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args); |  437   static void SetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args); | 
|  439   static void UnsetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args); |  438   static void UnsetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args); | 
|  440   static void SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args); |  439   static void SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args); | 
|  441   static void MakeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); |  440   static void MakeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); | 
|  442   static void RemoveDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); |  441   static void RemoveDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); | 
|  443  |  442   static void HostImportModuleDynamically(Isolate* isolate, | 
 |  443                                           Local<String> source_url, | 
 |  444                                           Local<String> specifier, | 
 |  445                                           Local<Promise> promise); | 
 |  446   static void DoHostImportModuleDynamically(void* data); | 
|  444   static void AddOSMethods(v8::Isolate* isolate, |  447   static void AddOSMethods(v8::Isolate* isolate, | 
|  445                            Local<ObjectTemplate> os_template); |  448                            Local<ObjectTemplate> os_template); | 
|  446  |  449  | 
|  447   static const char* kPrompt; |  450   static const char* kPrompt; | 
|  448   static ShellOptions options; |  451   static ShellOptions options; | 
|  449   static ArrayBuffer::Allocator* array_buffer_allocator; |  452   static ArrayBuffer::Allocator* array_buffer_allocator; | 
|  450  |  453  | 
|  451  private: |  454  private: | 
|  452   static Global<Context> evaluation_context_; |  455   static Global<Context> evaluation_context_; | 
|  453   static base::OnceType quit_once_; |  456   static base::OnceType quit_once_; | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
|  475   static void RunShell(Isolate* isolate); |  478   static void RunShell(Isolate* isolate); | 
|  476   static bool SetOptions(int argc, char* argv[]); |  479   static bool SetOptions(int argc, char* argv[]); | 
|  477   static Local<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate); |  480   static Local<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate); | 
|  478   static MaybeLocal<Context> CreateRealm( |  481   static MaybeLocal<Context> CreateRealm( | 
|  479       const v8::FunctionCallbackInfo<v8::Value>& args, int index, |  482       const v8::FunctionCallbackInfo<v8::Value>& args, int index, | 
|  480       v8::MaybeLocal<Value> global_object); |  483       v8::MaybeLocal<Value> global_object); | 
|  481   static void DisposeRealm(const v8::FunctionCallbackInfo<v8::Value>& args, |  484   static void DisposeRealm(const v8::FunctionCallbackInfo<v8::Value>& args, | 
|  482                            int index); |  485                            int index); | 
|  483   static MaybeLocal<Module> FetchModuleTree(v8::Local<v8::Context> context, |  486   static MaybeLocal<Module> FetchModuleTree(v8::Local<v8::Context> context, | 
|  484                                             const std::string& file_name); |  487                                             const std::string& file_name); | 
 |  488   static MaybeLocal<Module> DynamicFetchModuleTree( | 
 |  489       v8::Local<v8::Context> context, v8::Local<v8::Promise> promise, | 
 |  490       const std::string& file_name); | 
|  485 }; |  491 }; | 
|  486  |  492  | 
|  487  |  493  | 
|  488 }  // namespace v8 |  494 }  // namespace v8 | 
|  489  |  495  | 
|  490  |  496  | 
|  491 #endif  // V8_D8_H_ |  497 #endif  // V8_D8_H_ | 
| OLD | NEW |