32c29e8f01
If we attempt to pause, we'd check whether frames are framework code which we pattern match with a regexp. That could cause re-entering regexp, which is not allowed. Fixed: chromium:1125934 Change-Id: I3b52b202a5570f7929def39176cfe5e52be3dfd5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2602948 Commit-Queue: Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#71876}
28 lines
1.1 KiB
JavaScript
28 lines
1.1 KiB
JavaScript
// Copyright 2020 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: --allow-natives-syntax
|
|
// Flags: --no-enable-experimental-regexp-engine
|
|
// Flags: --no-enable-experimental-regexp-engine-on-excessive-backtracks
|
|
// Flags: --no-regexp-tier-up
|
|
|
|
let {session, contextGroup, Protocol} = InspectorTest.start(
|
|
'Checks pause inside blackboxed optimized function call.');
|
|
session.setupScriptMap();
|
|
|
|
(async function test(){
|
|
Protocol.Debugger.enable();
|
|
// Use an non-atomic regexp to trigger the actual regexp engine.
|
|
Protocol.Debugger.setBlackboxPatterns({patterns: ['.*\.js']});
|
|
// Run a script dominated by a regexp, with a sourceURL to pattern-match.
|
|
Protocol.Runtime.evaluate({expression: `
|
|
/((a*)*)*b/.exec('aaaaaaaaaaaaaa');
|
|
//# sourceURL=framework.js`});
|
|
// Issue lots of pause messages to trigger at least one during regexp.
|
|
for (let i = 0; i < 100; i++) Protocol.Debugger.pause();
|
|
// Send the messages through interupt while regexp is running.
|
|
utils.interruptForMessages();
|
|
InspectorTest.completeTest();
|
|
})();
|