-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of Revert of Debugger: deduplicate shared function info when s…
…etting script break points. (patchset nwjs#1 id:1 of https://codereview.chromium.org/999273003/) Reason for revert: Reland since the failure has been fixed in https://codereview.chromium.org/1035523005/ Original issue's description: > Revert of Debugger: deduplicate shared function info when setting script break points. (patchset nwjs#4 id:60001 of https://codereview.chromium.org/998253005/) > > Reason for revert: > Code caching failures. > > Original issue's description: > > Debugger: deduplicate shared function info when setting script break points. > > > > Also fix Debug.showBreakPoints for multiple break points at the same location. > > > > BUG=v8:3960 > > LOG=N > > > > Committed: https://crrev.com/73b17a71a22564c0b66d9aa7c00948c748f5b290 > > Cr-Commit-Position: refs/heads/master@{#27444} > > TBR=mstarzinger@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=v8:3960 > > Committed: https://crrev.com/9b29d008dfcc00bf56be8040add1d2c5e404673b > Cr-Commit-Position: refs/heads/master@{#27448} TBR=mstarzinger@chromium.org BUG=v8:3960 LOG=N Review URL: https://codereview.chromium.org/1037013002 Cr-Commit-Position: refs/heads/master@{#27472}
- Loading branch information
Showing
8 changed files
with
77 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// 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: --allow-natives-syntax | ||
|
||
// Test that setting break point is works correctly when the debugger is | ||
// activated late, which leads to duplicate shared function infos. | ||
|
||
(function() { | ||
var Debug = %GetDebugContext().Debug; | ||
|
||
function listener(event, exec_state, event_data, data) { | ||
if (event != Debug.DebugEvent.Break) return; | ||
try { | ||
assertTrue(/foo/.test(exec_state.frame(0).sourceLineText())); | ||
break_count++; | ||
} catch (e) { | ||
exception = e; | ||
} | ||
} | ||
|
||
for (var i = 0; i < 3; i++) { | ||
var foo = function() { a = 1; } | ||
var exception = null; | ||
var break_count = 0; | ||
Debug.setListener(listener); | ||
if (i < 2) Debug.setBreakPoint(foo, 0, 0); | ||
assertTrue(/\[B\d\]a = 1/.test(Debug.showBreakPoints(foo))); | ||
foo(); | ||
assertEquals(1, break_count); | ||
assertNull(exception); | ||
} | ||
|
||
Debug.setListener(null); | ||
})(); |