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

Side by Side Diff: test/inspector/inspector-test.cc

Issue 2748503002: [inspector] changed a way of preserving stepping between tasks (Closed)
Patch Set: rebased on tunned stepping at return Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 void AsyncRun(v8::Isolate* isolate, 336 void AsyncRun(v8::Isolate* isolate,
337 const v8::Global<v8::Context>& global_context) override { 337 const v8::Global<v8::Context>& global_context) override {
338 v8::MicrotasksScope microtasks_scope(isolate, 338 v8::MicrotasksScope microtasks_scope(isolate,
339 v8::MicrotasksScope::kRunMicrotasks); 339 v8::MicrotasksScope::kRunMicrotasks);
340 v8::HandleScope handle_scope(isolate); 340 v8::HandleScope handle_scope(isolate);
341 v8::Local<v8::Context> context = global_context.Get(isolate); 341 v8::Local<v8::Context> context = global_context.Get(isolate);
342 v8::Context::Scope context_scope(context); 342 v8::Context::Scope context_scope(context);
343 343
344 v8::Local<v8::Function> function = function_.Get(isolate); 344 v8::Local<v8::Function> function = function_.Get(isolate);
345 v8::MaybeLocal<v8::Value> result; 345 v8::MaybeLocal<v8::Value> result;
346 v8_inspector::V8Inspector* inspector =
347 InspectorClientImpl::InspectorFromContext(context);
348 if (inspector) inspector->willExecuteScript(context, function->ScriptId());
349 result = function->Call(context, context->Global(), 0, nullptr); 346 result = function->Call(context, context->Global(), 0, nullptr);
350 if (inspector) inspector->didExecuteScript(context);
351 } 347 }
352 348
353 private: 349 private:
354 v8::Global<v8::Function> function_; 350 v8::Global<v8::Function> function_;
355 }; 351 };
356 352
357 class SetTimeoutExtension : public v8::Extension { 353 class SetTimeoutExtension : public v8::Extension {
358 public: 354 public:
359 SetTimeoutExtension() 355 SetTimeoutExtension()
360 : v8::Extension("v8_inspector/setTimeout", 356 : v8::Extension("v8_inspector/setTimeout",
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 argv[i]); 679 argv[i]);
684 Exit(); 680 Exit();
685 } 681 }
686 frontend_runner.Append(new ExecuteStringTask(chars)); 682 frontend_runner.Append(new ExecuteStringTask(chars));
687 } 683 }
688 684
689 frontend_runner.Join(); 685 frontend_runner.Join();
690 backend_runner.Join(); 686 backend_runner.Join();
691 return 0; 687 return 0;
692 } 688 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698