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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 throwScriptForbiddenException(isolate); | 648 throwScriptForbiddenException(isolate); |
649 return v8::MaybeLocal<v8::Value>(); | 649 return v8::MaybeLocal<v8::Value>(); |
650 } | 650 } |
651 if (!depth) | 651 if (!depth) |
652 TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", | 652 TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", |
653 InspectorFunctionCallEvent::data(context, function)); | 653 InspectorFunctionCallEvent::data(context, function)); |
654 | 654 |
655 DCHECK(!frame || | 655 DCHECK(!frame || |
656 BindingSecurity::shouldAllowAccessToFrame( | 656 BindingSecurity::shouldAllowAccessToFrame( |
657 toDOMWindow(function->CreationContext())->toLocalDOMWindow(), | 657 toDOMWindow(function->CreationContext())->toLocalDOMWindow(), |
658 frame, BindingSecurity::ErrorReportOption::DoNotReport)); | 658 *frame, BindingSecurity::ErrorReportOption::DoNotReport)); |
659 CHECK(!ThreadState::current()->isWrapperTracingForbidden()); | 659 CHECK(!ThreadState::current()->isWrapperTracingForbidden()); |
660 v8::MicrotasksScope microtasksScope(isolate, | 660 v8::MicrotasksScope microtasksScope(isolate, |
661 v8::MicrotasksScope::kRunMicrotasks); | 661 v8::MicrotasksScope::kRunMicrotasks); |
662 probe::willCallFunction(context); | 662 probe::willCallFunction(context); |
663 ThreadDebugger::willExecuteScript(isolate, function->ScriptId()); | 663 ThreadDebugger::willExecuteScript(isolate, function->ScriptId()); |
664 v8::MaybeLocal<v8::Value> result = | 664 v8::MaybeLocal<v8::Value> result = |
665 function->Call(isolate->GetCurrentContext(), receiver, argc, args); | 665 function->Call(isolate->GetCurrentContext(), receiver, argc, args); |
666 CHECK(!isolate->IsDead()); | 666 CHECK(!isolate->IsDead()); |
667 ThreadDebugger::didExecuteScript(isolate); | 667 ThreadDebugger::didExecuteScript(isolate); |
668 probe::didCallFunction(context, function); | 668 probe::didCallFunction(context, function); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 v8AtomicString(isolate, "((e) => { throw e; })"), origin) | 735 v8AtomicString(isolate, "((e) => { throw e; })"), origin) |
736 .ToLocalChecked(); | 736 .ToLocalChecked(); |
737 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script) | 737 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script) |
738 .ToLocalChecked() | 738 .ToLocalChecked() |
739 .As<v8::Function>(); | 739 .As<v8::Function>(); |
740 v8::Local<v8::Value> args[] = {exception}; | 740 v8::Local<v8::Value> args[] = {exception}; |
741 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate); | 741 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate); |
742 } | 742 } |
743 | 743 |
744 } // namespace blink | 744 } // namespace blink |
OLD | NEW |