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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 2490563002: Revert of DevTools: add the logging aspect into the PerformanceMonitor (Closed)
Patch Set: Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 throwScriptForbiddenException(isolate); 517 throwScriptForbiddenException(isolate);
518 return v8::MaybeLocal<v8::Value>(); 518 return v8::MaybeLocal<v8::Value>();
519 } 519 }
520 v8::MicrotasksScope microtasksScope(isolate, 520 v8::MicrotasksScope microtasksScope(isolate,
521 v8::MicrotasksScope::kRunMicrotasks); 521 v8::MicrotasksScope::kRunMicrotasks);
522 PerformanceMonitor::willExecuteScript(context); 522 PerformanceMonitor::willExecuteScript(context);
523 ThreadDebugger::willExecuteScript(isolate, 523 ThreadDebugger::willExecuteScript(isolate,
524 script->GetUnboundScript()->GetId()); 524 script->GetUnboundScript()->GetId());
525 result = script->Run(isolate->GetCurrentContext()); 525 result = script->Run(isolate->GetCurrentContext());
526 ThreadDebugger::didExecuteScript(isolate); 526 ThreadDebugger::didExecuteScript(isolate);
527 PerformanceMonitor::didExecuteScript(context);
528 } 527 }
529 528
530 crashIfIsolateIsDead(isolate); 529 crashIfIsolateIsDead(isolate);
531 return result; 530 return result;
532 } 531 }
533 532
534 v8::MaybeLocal<v8::Value> V8ScriptRunner::compileAndRunInternalScript( 533 v8::MaybeLocal<v8::Value> V8ScriptRunner::compileAndRunInternalScript(
535 v8::Local<v8::String> source, 534 v8::Local<v8::String> source,
536 v8::Isolate* isolate, 535 v8::Isolate* isolate,
537 const String& fileName, 536 const String& fileName,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 InspectorFunctionCallEvent::data(context, function)); 630 InspectorFunctionCallEvent::data(context, function));
632 631
633 v8::MicrotasksScope microtasksScope(isolate, 632 v8::MicrotasksScope microtasksScope(isolate,
634 v8::MicrotasksScope::kRunMicrotasks); 633 v8::MicrotasksScope::kRunMicrotasks);
635 PerformanceMonitor::willExecuteScript(context); 634 PerformanceMonitor::willExecuteScript(context);
636 ThreadDebugger::willExecuteScript(isolate, function->ScriptId()); 635 ThreadDebugger::willExecuteScript(isolate, function->ScriptId());
637 v8::MaybeLocal<v8::Value> result = 636 v8::MaybeLocal<v8::Value> result =
638 function->Call(isolate->GetCurrentContext(), receiver, argc, args); 637 function->Call(isolate->GetCurrentContext(), receiver, argc, args);
639 crashIfIsolateIsDead(isolate); 638 crashIfIsolateIsDead(isolate);
640 ThreadDebugger::didExecuteScript(isolate); 639 ThreadDebugger::didExecuteScript(isolate);
641 PerformanceMonitor::didExecuteScript(context);
642 if (!depth) 640 if (!depth)
643 TRACE_EVENT_END0("devtools.timeline", "FunctionCall"); 641 TRACE_EVENT_END0("devtools.timeline", "FunctionCall");
644 return result; 642 return result;
645 } 643 }
646 644
647 v8::MaybeLocal<v8::Value> V8ScriptRunner::callInternalFunction( 645 v8::MaybeLocal<v8::Value> V8ScriptRunner::callInternalFunction(
648 v8::Local<v8::Function> function, 646 v8::Local<v8::Function> function,
649 v8::Local<v8::Value> receiver, 647 v8::Local<v8::Value> receiver,
650 int argc, 648 int argc,
651 v8::Local<v8::Value> args[], 649 v8::Local<v8::Value> args[],
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 v8AtomicString(isolate, "((e) => { throw e; })"), origin) 742 v8AtomicString(isolate, "((e) => { throw e; })"), origin)
745 .ToLocalChecked(); 743 .ToLocalChecked();
746 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script) 744 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script)
747 .ToLocalChecked() 745 .ToLocalChecked()
748 .As<v8::Function>(); 746 .As<v8::Function>();
749 v8::Local<v8::Value> args[] = {exception}; 747 v8::Local<v8::Value> args[] = {exception};
750 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate); 748 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate);
751 } 749 }
752 750
753 } // namespace blink 751 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/input-event-warning.html ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698