Skip to content
Snippets Groups Projects
Commit c0ea4520 authored by Florian Angerer's avatar Florian Angerer
Browse files

Disable browser for children contexts.

parent 208e2e7f
No related branches found
No related tags found
No related merge requests found
......@@ -79,12 +79,12 @@ public class BrowserFunctions {
@Specialization
protected RNull browser(VirtualFrame frame, Object text, RNull condition, boolean expr, int skipCalls) {
if (expr) {
RContext instance = RContext.getInstance();
if (instance.getKind() == ContextKind.SHARE_NOTHING) {
RContext curContext = RContext.getInstance();
if (!curContext.isInitial() && curContext.getKind() == ContextKind.SHARE_ALL && curContext.getParent().getKind() == ContextKind.SHARE_NOTHING) {
return RNull.instance;
}
BrowserState browserState = instance.stateInstrumentation.getBrowserState();
BrowserState browserState = curContext.stateInstrumentation.getBrowserState();
try {
browserState.push(new HelperState(text, condition));
MaterializedFrame mFrame = frame.materialize();
......
......@@ -598,6 +598,8 @@ public final class RContext implements RTruffleObject {
}
state = EnumSet.of(State.DISPOSED);
assert !initial || EvalThread.threadCnt.get() == 0 : "Did not close all children contexts";
this.allocationReporter.removePropertyChangeListener(ALLOCATION_ACTIVATION_LISTENER);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment