aaaaa80f02
V8 can bundle user scripts in the start up snapshot. These are
shared across contexts, and do not work well context groups.
R=kozyatinskiy@chromium.org
BUG=v8:6274
Review-Url: https://codereview.chromium.org/2836623002
Cr-Original-Commit-Position: refs/heads/master@{#44847}
Committed: 9685cfd310
Review-Url: https://codereview.chromium.org/2836623002
Cr-Commit-Position: refs/heads/master@{#44897}
31 lines
801 B
JavaScript
31 lines
801 B
JavaScript
// Copyright 2017 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.
|
|
|
|
// Embed a user function in the snapshot and step through it.
|
|
|
|
// Flags: --embed 'function c(f, ...args) { return f(...args); }'
|
|
|
|
InspectorTest.setupScriptMap();
|
|
|
|
InspectorTest.addScript(`
|
|
function test() {
|
|
function f(x) {
|
|
return x * 2;
|
|
}
|
|
debugger;
|
|
c(f, 2);
|
|
}
|
|
//# sourceURL=test.js`);
|
|
|
|
Protocol.Debugger.onPaused(message => {
|
|
InspectorTest.log("paused");
|
|
var frames = message.params.callFrames;
|
|
InspectorTest.logSourceLocation(frames[0].location);
|
|
Protocol.Debugger.stepInto();
|
|
})
|
|
|
|
Protocol.Debugger.enable()
|
|
.then(() => Protocol.Runtime.evaluate({ expression: 'test()' }))
|
|
.then(InspectorTest.completeTest);
|