mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Adding getParent() to omg.debug.DebuggableScript to allow to browse whole script function tree from any function.
This commit is contained in:
parent
ad34599811
commit
2593ae88cb
@ -255,6 +255,7 @@ public class Interpreter
|
||||
jsi.scriptOrFn = def;
|
||||
jsi.itsData = new InterpreterData(itsData.securityDomain,
|
||||
itsData.languageVersion);
|
||||
jsi.itsData.parentData = itsData;
|
||||
jsi.itsData.itsSourceFile = itsData.itsSourceFile;
|
||||
jsi.itsData.encodedSource = itsData.encodedSource;
|
||||
jsi.itsData.itsCheckThis = def.getCheckThis();
|
||||
|
@ -100,6 +100,8 @@ final class InterpreterData implements Serializable, DebuggableScript
|
||||
|
||||
boolean topLevel;
|
||||
|
||||
InterpreterData parentData;
|
||||
|
||||
public boolean isTopLevel()
|
||||
{
|
||||
return topLevel;
|
||||
@ -139,4 +141,10 @@ final class InterpreterData implements Serializable, DebuggableScript
|
||||
{
|
||||
return itsNestedFunctions[index];
|
||||
}
|
||||
|
||||
public DebuggableScript getParent()
|
||||
{
|
||||
return parentData;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -83,4 +83,6 @@ public interface DebuggableScript
|
||||
|
||||
public DebuggableScript getFunction(int index);
|
||||
|
||||
public DebuggableScript getParent();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user