| OLD | NEW | 
|    1 // Copyright 2016 the V8 project authors. All rights reserved. |    1 // Copyright 2016 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 #if !defined(_WIN32) && !defined(_WIN64) |    5 #if !defined(_WIN32) && !defined(_WIN64) | 
|    6 #include <unistd.h>  // NOLINT |    6 #include <unistd.h>  // NOLINT | 
|    7 #endif               // !defined(_WIN32) && !defined(_WIN64) |    7 #endif               // !defined(_WIN32) && !defined(_WIN64) | 
|    8  |    8  | 
|    9 #include <locale.h> |    9 #include <locale.h> | 
|   10  |   10  | 
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  337   void AsyncRun(v8::Isolate* isolate, |  337   void AsyncRun(v8::Isolate* isolate, | 
|  338                 const v8::Global<v8::Context>& global_context) override { |  338                 const v8::Global<v8::Context>& global_context) override { | 
|  339     v8::MicrotasksScope microtasks_scope(isolate, |  339     v8::MicrotasksScope microtasks_scope(isolate, | 
|  340                                          v8::MicrotasksScope::kRunMicrotasks); |  340                                          v8::MicrotasksScope::kRunMicrotasks); | 
|  341     v8::HandleScope handle_scope(isolate); |  341     v8::HandleScope handle_scope(isolate); | 
|  342     v8::Local<v8::Context> context = global_context.Get(isolate); |  342     v8::Local<v8::Context> context = global_context.Get(isolate); | 
|  343     v8::Context::Scope context_scope(context); |  343     v8::Context::Scope context_scope(context); | 
|  344  |  344  | 
|  345     v8::Local<v8::Function> function = function_.Get(isolate); |  345     v8::Local<v8::Function> function = function_.Get(isolate); | 
|  346     v8::MaybeLocal<v8::Value> result; |  346     v8::MaybeLocal<v8::Value> result; | 
|  347     v8_inspector::V8Inspector* inspector = |  | 
|  348         InspectorClientImpl::InspectorFromContext(context); |  | 
|  349     if (inspector) inspector->willExecuteScript(context, function->ScriptId()); |  | 
|  350     result = function->Call(context, context->Global(), 0, nullptr); |  347     result = function->Call(context, context->Global(), 0, nullptr); | 
|  351     if (inspector) inspector->didExecuteScript(context); |  | 
|  352   } |  348   } | 
|  353  |  349  | 
|  354  private: |  350  private: | 
|  355   v8::Global<v8::Function> function_; |  351   v8::Global<v8::Function> function_; | 
|  356 }; |  352 }; | 
|  357  |  353  | 
|  358 class SetTimeoutExtension : public v8::Extension { |  354 class SetTimeoutExtension : public v8::Extension { | 
|  359  public: |  355  public: | 
|  360   SetTimeoutExtension() |  356   SetTimeoutExtension() | 
|  361       : v8::Extension("v8_inspector/setTimeout", |  357       : v8::Extension("v8_inspector/setTimeout", | 
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  684               argv[i]); |  680               argv[i]); | 
|  685       Exit(); |  681       Exit(); | 
|  686     } |  682     } | 
|  687     frontend_runner.Append(new ExecuteStringTask(chars)); |  683     frontend_runner.Append(new ExecuteStringTask(chars)); | 
|  688   } |  684   } | 
|  689  |  685  | 
|  690   frontend_runner.Join(); |  686   frontend_runner.Join(); | 
|  691   backend_runner.Join(); |  687   backend_runner.Join(); | 
|  692   return 0; |  688   return 0; | 
|  693 } |  689 } | 
| OLD | NEW |