Skip to content

Commit ed887a3

Browse files
author
Paul Verest
committed
Merge pull request #193 from swingfield/master
Nodeclipse issue #189 - workaround for node issue 25266
2 parents fc9c8a9 + e5b5b0f commit ed887a3

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

‎chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/DebuggerCommand.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public enum DebuggerCommand {
3333
BREAK("break"),
3434
EXCEPTION("exception"),
3535
AFTER_COMPILE("afterCompile"),
36+
COMPILE_ERROR("compileError"),
3637
SCRIPT_COLLECTED("scriptCollected"),
3738
;
3839

‎chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/DefaultResponseHandler.java‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,27 @@ BreakpointProcessor get(DefaultResponseHandler instance) {
7979
command2EventProcessorGetter.put(DebuggerCommand.BREAK /* event */, bppGetter);
8080
command2EventProcessorGetter.put(DebuggerCommand.EXCEPTION /* event */, bppGetter);
8181

82+
// Nodeclipse Issue 189 / node issue 25266
83+
// Treat the "compileError" event as if it were
84+
// the "afterCompile" event...
85+
// This is a workaround for an apparent problem in node
86+
// that was introduced in v0.11.14. The reported problem
87+
// is that when a new script is required and compiled,
88+
// the compileError event is generated instead of the
89+
// afterCompile event.
90+
// If this does in fact turn out to be a node issue,
91+
// then presumably this workaround would be version-specific,
92+
// and would only need to be activated for certain versions
93+
// of node.
94+
command2EventProcessorGetter.put(DebuggerCommand.COMPILE_ERROR /* event */,
95+
new ProcessorGetter() {
96+
@Override
97+
AfterCompileProcessor get(DefaultResponseHandler instance) {
98+
return instance.afterCompileProcessor;
99+
}
100+
});
101+
// <end> Nodeclipse Issue 189 / node issue 25266
102+
82103
command2EventProcessorGetter.put(DebuggerCommand.AFTER_COMPILE /* event */,
83104
new ProcessorGetter() {
84105
@Override

0 commit comments

Comments
 (0)