Index: test/debugger/debug/debug-liveedit-check-stack.js |
diff --git a/test/debugger/debug/debug-liveedit-check-stack.js b/test/debugger/debug/debug-liveedit-check-stack.js |
index bba7acafecd6ea0a73f015f6ea752177fb0b75ff..e016a5391c3f692762b18842518dc7bda0855c6d 100644 |
--- a/test/debugger/debug/debug-liveedit-check-stack.js |
+++ b/test/debugger/debug/debug-liveedit-check-stack.js |
@@ -89,9 +89,28 @@ function WrapInNativeCall(f) { |
}; |
} |
+function ExecuteInDebugContext(f) { |
+ var result; |
+ var exception = null; |
+ Debug.setListener(function(event) { |
+ if (event == Debug.DebugEvent.Break) { |
+ try { |
+ result = f(); |
+ } catch (e) { |
+ // Rethrow this exception later. |
+ exception = e; |
+ } |
+ } |
+ }); |
+ debugger; |
+ Debug.setListener(null); |
+ if (exception !== null) throw exception; |
+ return result; |
+} |
+ |
function WrapInDebuggerCall(f) { |
return function() { |
- return %ExecuteInDebugContext(f); |
+ return ExecuteInDebugContext(f); |
}; |
} |