Commit 27cff23c authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[inspector] avoid running gc before reporting scripts

It will help us to preserve some scripts for user.

R=alph@chromium.org
TBR=jgruber@chromium.org

Bug: chromium:655701
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I6d42434148c2d9eb41c3a2af906e8c14ccf8d9a9
Reviewed-on: https://chromium-review.googlesource.com/806741
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49913}
parent 9a64d7b6
......@@ -9875,9 +9875,6 @@ void debug::GetLoadedScripts(v8::Isolate* v8_isolate,
PersistentValueVector<debug::Script>& scripts) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
// TODO(kozyatinskiy): remove this GC once tests are dealt with.
isolate->heap()->CollectAllGarbage(i::Heap::kMakeHeapIterableMask,
i::GarbageCollectionReason::kDebugger);
{
i::DisallowHeapAllocation no_gc;
i::Script::Iterator iterator(isolate);
......
......@@ -25,10 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-gc
// Test whether scripts compiled after setting the break point are
// updated correctly.
gc();
Debug = debug.Debug;
var break_count = 0;
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-gc
gc();
function static() {
print("> static"); // Break
}
......
......@@ -116,7 +116,7 @@ function testSimpleExpressions() {
|_|a--;
|R|}
Object.defineProperty(this, 'getterFoo', {
|_|Object.|C|defineProperty(this, 'getterFoo', {
get: () => |_|return42|R|
});
......@@ -124,7 +124,7 @@ function testGetter() {
|C|getterFoo();
|R|}
var obj = {
var obj = |_|{
foo: () => (|_|{
boo: () => |_|return42|R|
})|R|
......@@ -260,7 +260,7 @@ async function testPromiseComplex() {
|R|}
function twiceDefined() {
return a + b;
|_|return a + b;|R|
}
function twiceDefined() {
......
......@@ -26,4 +26,10 @@ Running test: testTailCall
scriptId : <scriptId>
type : return
}
[4] : {
columnNumber : 1
lineNumber : 6
scriptId : <scriptId>
type : return
}
]
Tests how wasm scripts are reported
Check that inspector gets two wasm scripts at module creation time.
Script #0 parsed. URL: v8://test/testFunction
Script #1 parsed. URL: v8://test/runTestRunction
Script #2 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-0
Script #3 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-1
Script #1 parsed. URL:
Script #2 parsed. URL: v8://test/runTestRunction
Script #3 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-0
Script #4 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-1
Source for wasm://wasm/wasm-7b04570e/wasm-7b04570e-0:
func $nopFunction
nop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment