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

Side by Side Diff: src/inspector/v8-console.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
« no previous file with comments | « no previous file | src/inspector/v8-debugger.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/inspector/v8-console.h" 5 #include "src/inspector/v8-console.h"
6 6
7 #include "src/base/macros.h" 7 #include "src/base/macros.h"
8 #include "src/inspector/injected-script.h" 8 #include "src/inspector/injected-script.h"
9 #include "src/inspector/inspected-context.h" 9 #include "src/inspector/inspected-context.h"
10 #include "src/inspector/string-util.h" 10 #include "src/inspector/string-util.h"
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 " originAssert.apply(null, arguments);\n" 733 " originAssert.apply(null, arguments);\n"
734 " }\n" 734 " }\n"
735 "})"; 735 "})";
736 736
737 v8::Local<v8::String> assertSource = toV8String(isolate, jsConsoleAssert); 737 v8::Local<v8::String> assertSource = toV8String(isolate, jsConsoleAssert);
738 V8InspectorImpl* inspector = inspectedContext->inspector(); 738 V8InspectorImpl* inspector = inspectedContext->inspector();
739 v8::Local<v8::Value> setupFunction; 739 v8::Local<v8::Value> setupFunction;
740 if (inspector->compileAndRunInternalScript(context, assertSource) 740 if (inspector->compileAndRunInternalScript(context, assertSource)
741 .ToLocal(&setupFunction) && 741 .ToLocal(&setupFunction) &&
742 setupFunction->IsFunction()) { 742 setupFunction->IsFunction()) {
743 inspector->callInternalFunction( 743 v8::MicrotasksScope microtasksScope(
744 v8::Local<v8::Function>::Cast(setupFunction), context, console, 0, 744 isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
745 nullptr); 745 v8::MaybeLocal<v8::Value> result;
746 result = v8::Local<v8::Function>::Cast(setupFunction)
747 ->Call(context, console, 0, nullptr);
746 } 748 }
747 749
748 if (hasMemoryAttribute) 750 if (hasMemoryAttribute)
749 console->SetAccessorProperty( 751 console->SetAccessorProperty(
750 toV8StringInternalized(isolate, "memory"), 752 toV8StringInternalized(isolate, "memory"),
751 v8::Function::New(context, V8Console::memoryGetterCallback, console, 0, 753 v8::Function::New(context, V8Console::memoryGetterCallback, console, 0,
752 v8::ConstructorBehavior::kThrow) 754 v8::ConstructorBehavior::kThrow)
753 .ToLocalChecked(), 755 .ToLocalChecked(),
754 v8::Function::New(context, V8Console::memorySetterCallback, 756 v8::Function::New(context, V8Console::memorySetterCallback,
755 v8::Local<v8::Value>(), 0, 757 v8::Local<v8::Value>(), 0,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 ->GetOwnPropertyDescriptor( 945 ->GetOwnPropertyDescriptor(
944 m_context, v8::Local<v8::String>::Cast(name)) 946 m_context, v8::Local<v8::String>::Cast(name))
945 .ToLocal(&descriptor); 947 .ToLocal(&descriptor);
946 DCHECK(success); 948 DCHECK(success);
947 USE(success); 949 USE(success);
948 } 950 }
949 } 951 }
950 } 952 }
951 953
952 } // namespace v8_inspector 954 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « no previous file | src/inspector/v8-debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698