| OLD | NEW |
| 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 if (ScriptForbiddenScope::isScriptForbidden()) { | 625 if (ScriptForbiddenScope::isScriptForbidden()) { |
| 626 throwScriptForbiddenException(isolate); | 626 throwScriptForbiddenException(isolate); |
| 627 return v8::MaybeLocal<v8::Value>(); | 627 return v8::MaybeLocal<v8::Value>(); |
| 628 } | 628 } |
| 629 if (!depth) | 629 if (!depth) |
| 630 TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", | 630 TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", |
| 631 InspectorFunctionCallEvent::data(context, function)); | 631 InspectorFunctionCallEvent::data(context, function)); |
| 632 | 632 |
| 633 v8::MicrotasksScope microtasksScope(isolate, | 633 v8::MicrotasksScope microtasksScope(isolate, |
| 634 v8::MicrotasksScope::kRunMicrotasks); | 634 v8::MicrotasksScope::kRunMicrotasks); |
| 635 PerformanceMonitor::willExecuteScript(context); | 635 PerformanceMonitor::willCallFunction(context); |
| 636 ThreadDebugger::willExecuteScript(isolate, function->ScriptId()); | 636 ThreadDebugger::willExecuteScript(isolate, function->ScriptId()); |
| 637 v8::MaybeLocal<v8::Value> result = | 637 v8::MaybeLocal<v8::Value> result = |
| 638 function->Call(isolate->GetCurrentContext(), receiver, argc, args); | 638 function->Call(isolate->GetCurrentContext(), receiver, argc, args); |
| 639 crashIfIsolateIsDead(isolate); | 639 crashIfIsolateIsDead(isolate); |
| 640 ThreadDebugger::didExecuteScript(isolate); | 640 ThreadDebugger::didExecuteScript(isolate); |
| 641 PerformanceMonitor::didExecuteScript(context); | 641 PerformanceMonitor::didCallFunction(context, function); |
| 642 if (!depth) | 642 if (!depth) |
| 643 TRACE_EVENT_END0("devtools.timeline", "FunctionCall"); | 643 TRACE_EVENT_END0("devtools.timeline", "FunctionCall"); |
| 644 return result; | 644 return result; |
| 645 } | 645 } |
| 646 | 646 |
| 647 v8::MaybeLocal<v8::Value> V8ScriptRunner::callInternalFunction( | 647 v8::MaybeLocal<v8::Value> V8ScriptRunner::callInternalFunction( |
| 648 v8::Local<v8::Function> function, | 648 v8::Local<v8::Function> function, |
| 649 v8::Local<v8::Value> receiver, | 649 v8::Local<v8::Value> receiver, |
| 650 int argc, | 650 int argc, |
| 651 v8::Local<v8::Value> args[], | 651 v8::Local<v8::Value> args[], |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 v8AtomicString(isolate, "((e) => { throw e; })"), origin) | 744 v8AtomicString(isolate, "((e) => { throw e; })"), origin) |
| 745 .ToLocalChecked(); | 745 .ToLocalChecked(); |
| 746 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script) | 746 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script) |
| 747 .ToLocalChecked() | 747 .ToLocalChecked() |
| 748 .As<v8::Function>(); | 748 .As<v8::Function>(); |
| 749 v8::Local<v8::Value> args[] = {exception}; | 749 v8::Local<v8::Value> args[] = {exception}; |
| 750 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate); | 750 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate); |
| 751 } | 751 } |
| 752 | 752 |
| 753 } // namespace blink | 753 } // namespace blink |
| OLD | NEW |