We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf25dd3 commit 63901e8Copy full SHA for 63901e8
1 file changed
src/node-constants.cc
@@ -1,4 +1,5 @@
1
#include <lldb/API/LLDB.h>
2
+#include <set>
3
4
#include "src/llv8-inl.h"
5
#include "src/node-constants.h"
@@ -66,7 +67,13 @@ addr_t Environment::LoadCurrentEnvironment(Error& err) {
66
67
continue;
68
}
69
bool found = false;
70
+ std::set<uint64_t> visited_contexts;
71
while (!found) {
72
+ // Necessary to avoid an infinite loop.
73
+ if (visited_contexts.count(val.raw())) {
74
+ break;
75
+ }
76
+ visited_contexts.insert(val.raw());
77
v8::Context context(val);
78
v8::Value native = context.Native(v8_err);
79
if (v8_err.Success()) {
0 commit comments